diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-01-01 23:32:15 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-01-02 00:23:40 +0100 |
commit | af9240cd3c6fb257ac2d0843334145f022ef5959 (patch) | |
tree | d75e07da8f3bae00223d2b555f46bbb7d181fb22 /libavformat/mpegenc.c | |
parent | f15f02c204e5fe355e084923c34dda1c6c3a66ec (diff) | |
download | ffmpeg-af9240cd3c6fb257ac2d0843334145f022ef5959.tar.gz |
mpegenc: simplify muxrate calculation
The fate-h264-bsf-mp4toannexb failures were caused by an integer
overflow of the unneeded multiplication.
Inspired by patch by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r-- | libavformat/mpegenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index d537af61cd..b2ca35a3df 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 / 20; bitrate += 10000; s->mux_rate = (bitrate + (8 * 50) - 1) / (8 * 50); } |