Port fixes after ffmpeg/libsvm upgrades