From: Jason Garrett-Glaser Date: Wed, 4 Nov 2009 07:15:35 +0000 (-0800) Subject: Fix extremely rare infinite loop in 2-pass VBV X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=bea99fbf88cc0da3f85f6ae6cccaf483c5d1fc1b;p=x264.git Fix extremely rare infinite loop in 2-pass VBV Implicit conversion from double->float lost enough precision to cause the loop termination condition to never trigger. Bug report by Tal Aloni. --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index ffd64685..ac5ba75c 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -37,13 +37,13 @@ typedef struct { int pict_type; int kept_as_ref; - float qscale; + double qscale; int mv_bits; int tex_bits; int misc_bits; uint64_t expected_bits; /*total expected bits up to the current frame (current one excluded)*/ double expected_vbv; - float new_qscale; + double new_qscale; int new_qp; int i_count; int p_count;