1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

mpegpsenc: Fix integer overflow of the muxrate calculation.

this should fix the failure of h264-bsf-mp4toannexb on freebsd/openbsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-01-01 03:46:06 +01:00
parent 57581e4110
commit 490c97bdf5

View File

@ -429,7 +429,7 @@ static int mpeg_mux_init(AVFormatContext *ctx)
if (!s->mux_rate) {
/* we increase slightly the bitrate to take into account the
headers. XXX: compute it exactly */
bitrate += bitrate*5/100;
bitrate += bitrate*5LL/100;
bitrate += 10000;
s->mux_rate = (bitrate + (8 * 50) - 1) / (8 * 50);
}