diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-03-17 18:08:11 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-03-17 18:08:11 +0000 |
commit | c67411593960f1a133657f0da930c8681a6a62b4 (patch) | |
tree | 2a72d3919c28aeff86c0e179954344d1e7d89828 | |
parent | 001e3f555daf02c6c48c5f3268c96a1b777dc7d0 (diff) | |
download | ffmpeg-c67411593960f1a133657f0da930c8681a6a62b4.tar.gz |
10l
Originally committed as revision 336 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegvideo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 15af25d7b7..9b23671952 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1675,6 +1675,7 @@ static int rate_estimate_qscale(MpegEncContext *s) diff= s->total_bits - wanted_bits; br_compensation= (s->bit_rate_tolerance - diff)/s->bit_rate_tolerance; + if(br_compensation<=0.0) br_compensation=0.001; q/=br_compensation; qscale= (int)(q + 0.5); |