diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-23 12:41:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-02 19:55:09 +0200 |
commit | 2e893054bf32b80c32256152f8d4fa7e9d4186ec (patch) | |
tree | 5546178020f72621c8750bb30b73439451aadfd6 | |
parent | 3a2dfcf3a1f3b601e92db135742c033440499db0 (diff) | |
download | ffmpeg-2e893054bf32b80c32256152f8d4fa7e9d4186ec.tar.gz |
avcodec/mpegaudioenc_template: fix invalid shift of sample
Fixes: Ticket8010
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a2c97a8342fab6393280cc2f0e2ffb39c381d29c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mpegaudioenc_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegaudioenc_template.c b/libavcodec/mpegaudioenc_template.c index 93363fe1d2..12f7a098e6 100644 --- a/libavcodec/mpegaudioenc_template.c +++ b/libavcodec/mpegaudioenc_template.c @@ -701,7 +701,7 @@ static void encode_frame(MpegAudioContext *s, /* normalize to P bits */ if (shift < 0) - q1 = sample << (-shift); + q1 = sample * (1 << -shift); else q1 = sample >> shift; q1 = (q1 * mult) >> P; |