Browse Source

avcodec/mpegaudioenc_template: fix invalid shift of sample

Fixes: Ticket8010

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3
Michael Niedermayer 5 years ago
parent
commit
a2c97a8342
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mpegaudioenc_template.c

+ 1
- 1
libavcodec/mpegaudioenc_template.c View File

@@ -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…
Cancel
Save