aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-01 03:46:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-01 03:50:43 +0100
commit490c97bdf5ed1c6f05abe4446e67e598881fc53f (patch)
tree44617a28aab37e1e2a04affc747b6f889c4baa9d
parent57581e41103ccc77db42a3bc62078f726db40416 (diff)
downloadffmpeg-490c97bdf5ed1c6f05abe4446e67e598881fc53f.tar.gz
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>
-rw-r--r--libavformat/mpegenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 01ee004f45..455be5706d 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -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);
}