Bug 1234553: Always request 16 bits audio for libavcodec 53. r=kentuckyfriedtakahe

LibAV 0.8 produces rubbish floating point data. We had restricted LibAV 0.8 to produce 16 bits audio instead, unfortunately some ubuntu version appears to have bumped the minor version.
This commit is contained in:
Jean-Yves Avenard 2015-12-24 13:09:09 +11:00
parent 7f022adf14
commit 1c8060a29f

View File

@ -90,8 +90,8 @@ FFmpegDataDecoder<LIBAV_VER>::InitDecoder()
// FFmpeg takes this as a suggestion for what format to use for audio samples.
uint32_t major, minor;
FFmpegRuntimeLinker::GetVersion(major, minor);
// LibAV 0.8 produces rubbish float interlaved samples, request 16 bits audio.
mCodecContext->request_sample_fmt = major == 53 && minor <= 34 ?
// LibAV 0.8 produces rubbish float interleaved samples, request 16 bits audio.
mCodecContext->request_sample_fmt = major == 53 ?
AV_SAMPLE_FMT_S16 : AV_SAMPLE_FMT_FLT;
// FFmpeg will call back to this to negotiate a video pixel format.