Commit c6902f96 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegaudioenc_template: Fix integer overflow

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 4615ff0d
......@@ -708,7 +708,7 @@ static void encode_frame(MpegAudioContext *s,
q1 += 1 << P;
if (q1 < 0)
q1 = 0;
q[m] = (unsigned)(q1 * steps) >> (P + 1);
q[m] = (q1 * (unsigned)steps) >> (P + 1);
}
#endif
if (q[m] >= steps)
......
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