]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/g723_1dec.c
Merge commit '8629149816930a43bf5a66b11c6224446cabd044'
[ffmpeg] / libavcodec / g723_1dec.c
index 676c4bbac34b4ad85777fd9ac0916245675ce0b7..d8bc3f97acfddcda0fdc06bae0969d29572ffc23 100644 (file)
@@ -883,7 +883,8 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
         G723_1_ChannelContext *p = &s->ch[ch];
         int16_t *audio = p->audio;
 
-        if (unpack_bitstream(p, buf, buf_size) < 0) {
+        if (unpack_bitstream(p, buf + ch * (buf_size / avctx->channels),
+                             buf_size / avctx->channels) < 0) {
             bad_frame = 1;
             if (p->past_frame_type == ACTIVE_FRAME)
                 p->cur_frame_type = ACTIVE_FRAME;