mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/mpegaudioenc_template: fix invalid shift of sample
Fixes: Ticket8010
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a2c97a8342
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8aee7f743f
commit
781636afa0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user