You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/mpegaudioenc_template: Fix integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -708,7 +708,7 @@ static void encode_frame(MpegAudioContext *s,
|
|||||||
q1 += 1 << P;
|
q1 += 1 << P;
|
||||||
if (q1 < 0)
|
if (q1 < 0)
|
||||||
q1 = 0;
|
q1 = 0;
|
||||||
q[m] = (unsigned)(q1 * steps) >> (P + 1);
|
q[m] = (q1 * (unsigned)steps) >> (P + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (q[m] >= steps)
|
if (q[m] >= steps)
|
||||||
|
Reference in New Issue
Block a user