Commit a2c97a83 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegaudioenc_template: fix invalid shift of sample

Fixes: Ticket8010
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent e13eee37
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment