[FFmpeg-cvslog] avcodec/g723_1dec: actually decode second channel

Paul B Mahol git at videolan.org
Thu Mar 7 03:00:02 EET 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Mar  7 01:58:43 2019 +0100| [0ce759defdab23d35abd8751a0f837c6aaa6ad12] | committer: Paul B Mahol

avcodec/g723_1dec: actually decode second channel

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ce759defdab23d35abd8751a0f837c6aaa6ad12
---

 libavcodec/g723_1dec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c
index 676c4bbac3..d8bc3f97ac 100644
--- a/libavcodec/g723_1dec.c
+++ b/libavcodec/g723_1dec.c
@@ -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;



More information about the ffmpeg-cvslog mailing list