10l: error in last commit. use decoder channels not encoder channels.
authorJustin Ruggles <justin.ruggles@gmail.com>
Sat, 18 Sep 2010 20:19:18 +0000 (20:19 +0000)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sat, 18 Sep 2010 20:19:18 +0000 (20:19 +0000)
Originally committed as revision 25144 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index e43e6fb..0a6964e 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -869,7 +869,7 @@ need_realloc:
         double delta = get_sync_ipts(ost) * enc->sample_rate - ost->sync_opts
                 - av_fifo_size(ost->fifo)/(enc->channels * 2);
         double idelta= delta*dec->sample_rate / enc->sample_rate;
-        int byte_delta= ((int)idelta)*2*enc->channels;
+        int byte_delta= ((int)idelta)*2*dec->channels;
 
         //FIXME resample delay
         if(fabs(delta) > 50){