changeset 270:6b51689f6717 libavcodec

10l
author michaelni
date Sun, 17 Mar 2002 18:08:11 +0000
parents 0bae80322c6d
children 997aac7d4e3e
files mpegvideo.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Sun Mar 17 17:44:45 2002 +0000
+++ b/mpegvideo.c	Sun Mar 17 18:08:11 2002 +0000
@@ -1675,6 +1675,7 @@
 
     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);