From bea99fbf88cc0da3f85f6ae6cccaf483c5d1fc1b Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Tue, 3 Nov 2009 23:15:35 -0800 Subject: [PATCH] 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. --- encoder/ratecontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.3