[xiph-commits] r16235 - trunk/ffmpeg2theora/src

j at svn.xiph.org j at svn.xiph.org
Thu Jul 9 11:05:51 PDT 2009


Author: j
Date: 2009-07-09 11:05:51 -0700 (Thu, 09 Jul 2009)
New Revision: 16235

Modified:
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
resample if sample_fmt does not match, fixed #1561

Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-07-09 16:07:40 UTC (rev 16234)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-07-09 18:05:51 UTC (rev 16235)
@@ -778,7 +778,9 @@
         }
 
         if (acodec != NULL && avcodec_open (aenc, acodec) >= 0) {
-            if (this->sample_rate != aenc->sample_rate || this->channels != aenc->channels) {
+            if (this->sample_rate != aenc->sample_rate
+                || this->channels != aenc->channels
+                || aenc->sample_fmt != SAMPLE_FMT_S16) {
                 // values take from libavcodec/resample.c
                 this->audio_resample_ctx = av_audio_resample_init(this->channels,    aenc->channels,
                                                                   this->sample_rate, aenc->sample_rate,



More information about the commits mailing list