mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avcodec/mpegaudioenc: prevent overflow in fixed point code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -704,6 +704,8 @@ static void encode_frame(MpegAudioContext *s,
|
||||
q1 = sample >> shift;
|
||||
q1 = (q1 * mult) >> P;
|
||||
q[m] = ((q1 + (1 << P)) * steps) >> (P + 1);
|
||||
if (q[m] < 0)
|
||||
q[m] = 0;
|
||||
}
|
||||
#endif
|
||||
if (q[m] >= steps)
|
||||
|
||||
Reference in New Issue
Block a user