[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54947] trunk/blender/intern: Fix/ workaround for newer FFmpeg 1.1.3 and MP3 decoder
Sergey Sharybin
sergey.vfx at gmail.com
Thu Feb 28 19:28:09 CET 2013
Revision: 54947
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54947
Author: nazgul
Date: 2013-02-28 18:28:08 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
trunk/blender/intern/ffmpeg/ffmpeg_compat.h
Modified: trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
===================================================================
--- trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2013-02-28 17:23:44 UTC (rev 54946)
+++ trunk/blender/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2013-02-28 18:28:08 UTC (rev 54947)
@@ -133,6 +133,11 @@
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);
Modified: trunk/blender/intern/ffmpeg/ffmpeg_compat.h
===================================================================
--- trunk/blender/intern/ffmpeg/ffmpeg_compat.h 2013-02-28 17:23:44 UTC (rev 54946)
+++ trunk/blender/intern/ffmpeg/ffmpeg_compat.h 2013-02-28 18:28:08 UTC (rev 54947)
@@ -74,6 +74,7 @@
#if ((LIBAVUTIL_VERSION_MAJOR > 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR >= 32))
#define FFMPEG_FFV1_ALPHA_SUPPORTED
+#define FFMPEG_SAMPLE_FMT_S16P_SUPPORTED
#endif
#if ((LIBAVUTIL_VERSION_MAJOR < 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR < 22))
More information about the Bf-blender-cvs
mailing list