From 3f46301fa2c26472beac370e85a03c1117abc2a4 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Fri, 3 Sep 2010 08:39:48 -0700 Subject: [PATCH] Fix overflow in stats printing --- encoder/encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoder/encoder.c b/encoder/encoder.c index ea55cb1e..919be0c8 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -3073,7 +3073,7 @@ void x264_encoder_close ( x264_t *h ) const int i_count = h->stat.i_frame_count[SLICE_TYPE_I] + h->stat.i_frame_count[SLICE_TYPE_P] + h->stat.i_frame_count[SLICE_TYPE_B]; - int64_t i_mb_count = i_count * h->mb.i_mb_count; + int64_t i_mb_count = (int64_t)i_count * h->mb.i_mb_count; float fps = (float) h->param.i_fps_num / h->param.i_fps_den; float f_bitrate; /* duration algorithm fails with one frame */ -- 2.40.0