You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-06 05:47:18 +02:00
avcodec/mpegaudioenc_template: fix invalid shift of sample
Fixes: Ticket8010 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -701,7 +701,7 @@ static void encode_frame(MpegAudioContext *s,
|
|||||||
|
|
||||||
/* normalize to P bits */
|
/* normalize to P bits */
|
||||||
if (shift < 0)
|
if (shift < 0)
|
||||||
q1 = sample << (-shift);
|
q1 = sample * (1 << -shift);
|
||||||
else
|
else
|
||||||
q1 = sample >> shift;
|
q1 = sample >> shift;
|
||||||
q1 = (q1 * mult) >> P;
|
q1 = (q1 * mult) >> P;
|
||||||
|
Reference in New Issue
Block a user