changeset 6676:36d091f338ca libavcodec

fix adpcm ima qt decoding, channel at init is 0, correct stereo out since samples += avctx->channels
author bcoudurier
date Fri, 25 Apr 2008 15:06:07 +0000
parents 9e639601ae3d
children abb1f01ca0db
files adpcm.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/adpcm.c	Fri Apr 25 14:09:42 2008 +0000
+++ b/adpcm.c	Fri Apr 25 15:06:07 2008 +0000
@@ -959,9 +959,10 @@
 
         if(st) { /* handle stereo interlacing */
             c->channel = (channel + 1) % 2; /* we get one packet for left, then one for right data */
-            if(channel == 1) { /* wait for the other packet before outputing anything */
+            if(!channel) { /* wait for the other packet before outputing anything */
                 return src - buf;
             }
+            samples--;
         }
         break;
     case CODEC_ID_ADPCM_IMA_WAV: