summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-04-25 15:06:07 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-04-25 15:06:07 +0000
commitd29ee34ce31668703913f9e9c5dc3b8df969addd (patch)
tree333da32f6854b2640aa809b76fd72d52e5c64157 /libavcodec
parent45a97d301871e467d8cc01847a41357beb30065c (diff)
fix adpcm ima qt decoding, channel at init is 0, correct stereo out since samples += avctx->channels
Originally committed as revision 12965 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/adpcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 1c4f275eaa..6152457904 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -959,9 +959,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
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: