summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/adpcm.c')
-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: