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
3a2dfcf3a1
commit
2e893054bf
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue