diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-28 22:28:08 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-28 22:28:08 +0400 |
commit | d7e427beffb6589ada91c4336e6ee86459cb24d8 (patch) | |
tree | 2c082fd5928429760a4e8d3f823cb8dcb27c62b9 /intern/audaspace | |
parent | 402f2159fa4cb76c602c0b9a9e3191b90c702c54 (diff) |
Fix/workaround for newer FFmpeg 1.1.3 and MP3 decoder
FFmpeg is now using S16P sampler for MP3 which is not actually
supported by audaspace, so request for S16 sampler instead.
Diffstat (limited to 'intern/audaspace')
-rw-r--r-- | intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp index 831e1998182..47bfe4e69b9 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp @@ -133,6 +133,11 @@ void AUD_FFMPEGReader::init() if(!aCodec) AUD_THROW(AUD_ERROR_FFMPEG, nodecoder_error); +#ifdef FFMPEG_SAMPLE_FMT_S16P_SUPPORTED + if(m_codecCtx->sample_fmt == AV_SAMPLE_FMT_S16P) + m_codecCtx->request_sample_fmt = AV_SAMPLE_FMT_S16; +#endif + if(avcodec_open2(m_codecCtx, aCodec, NULL) < 0) AUD_THROW(AUD_ERROR_FFMPEG, codecopen_error); |