Commit 490c97bd authored by Michael Niedermayer's avatar Michael Niedermayer

mpegpsenc: Fix integer overflow of the muxrate calculation.

this should fix the failure of h264-bsf-mp4toannexb on freebsd/openbsd
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 57581e41
...@@ -429,7 +429,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) ...@@ -429,7 +429,7 @@ static int mpeg_mux_init(AVFormatContext *ctx)
if (!s->mux_rate) { if (!s->mux_rate) {
/* we increase slightly the bitrate to take into account the /* we increase slightly the bitrate to take into account the
headers. XXX: compute it exactly */ headers. XXX: compute it exactly */
bitrate += bitrate*5/100; bitrate += bitrate*5LL/100;
bitrate += 10000; bitrate += 10000;
s->mux_rate = (bitrate + (8 * 50) - 1) / (8 * 50); s->mux_rate = (bitrate + (8 * 50) - 1) / (8 * 50);
} }
......
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