[FFmpeg-cvslog] avcodec/g723_1dec: Fix invalid shift

Andreas Rheinhardt git at videolan.org
Wed May 20 08:38:26 EEST 2020


ffmpeg | branch: release/4.2 | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Sep 20 00:17:04 2019 +0200| [3e4e968a986dea4840ac1175c5c73d8685975ac5] | committer: Andreas Rheinhardt

avcodec/g723_1dec: Fix invalid shift

Fixes the FATE-tests g723_1-dec-1, g723_1-dec-2 and g723_1-dec-4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 54e1efda6d67afb11e21e40109c10b447f8d7f3c)

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

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

diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c
index 802a2cbc16..f601d31d00 100644
--- a/libavcodec/g723_1dec.c
+++ b/libavcodec/g723_1dec.c
@@ -1012,7 +1012,7 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
             formant_postfilter(p, lpc, p->audio, out);
         } else { // if output is not postfiltered it should be scaled by 2
             for (i = 0; i < FRAME_LEN; i++)
-                out[i] = av_clip_int16(p->audio[LPC_ORDER + i] << 1);
+                out[i] = av_clip_int16(2 * p->audio[LPC_ORDER + i]);
         }
     }
 



More information about the ffmpeg-cvslog mailing list