From d29ee34ce31668703913f9e9c5dc3b8df969addd Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Fri, 25 Apr 2008 15:06:07 +0000 Subject: 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 --- libavcodec/adpcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec') 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: -- cgit v1.2.3