From d421ce5d657cdd8e200ac003cbfcffb45d6a388d Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Mon, 12 Oct 2009 15:38:51 -0700 Subject: [PATCH] Fix a very rare integer overflow in slicetype analysis Caused an assert failure when it occurred. Bug is as old as adaptive B-frames. --- encoder/slicetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoder/slicetype.c b/encoder/slicetype.c index e4bd0052..48d70dc1 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -349,7 +349,7 @@ static int x264_slicetype_frame_cost( x264_t *h, x264_mb_analysis_t *a, } if( b != p1 ) - i_score = i_score * 100 / (120 + h->param.i_bframe_bias); + i_score = (uint64_t)i_score * 100 / (120 + h->param.i_bframe_bias); else frames[b]->b_intra_calculated = 1; -- 2.50.1