mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +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:
parent
e13eee37ee
commit
a2c97a8342
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user