summaryrefslogtreecommitdiff
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-05-30 22:28:22 +0800
committerLimin Wang <lance.lmwang@gmail.com>2020-06-03 06:57:50 +0800
commit801c8a961a504f014439c4312ecc3d66f03aea93 (patch)
tree0f9f6e75d643222c4b44b90ba9edbb1328c7b649 /libavcodec/ratecontrol.c
parent6e1903938befc0bce2f64e01770af2f65d625cfc (diff)
downloadffmpeg-801c8a961a504f014439c4312ecc3d66f03aea93.tar.gz
avcodec/ratecontrol: fix the integer overflow after long time run
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 49d169ba25..6b77ccd006 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -999,11 +999,11 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
if (s->avctx->debug & FF_DEBUG_RC) {
av_log(s->avctx, AV_LOG_DEBUG,
- "%c qp:%d<%2.1f<%d %d want:%d total:%d comp:%f st_q:%2.2f "
+ "%c qp:%d<%2.1f<%d %d want:%"PRId64" total:%"PRId64" comp:%f st_q:%2.2f "
"size:%d var:%"PRId64"/%"PRId64" br:%"PRId64" fps:%d\n",
av_get_picture_type_char(pict_type),
qmin, q, qmax, picture_number,
- (int)wanted_bits / 1000, (int)s->total_bits / 1000,
+ wanted_bits / 1000, s->total_bits / 1000,
br_compensation, short_term_q, s->frame_bits,
pic->mb_var_sum, pic->mc_mb_var_sum,
s->bit_rate / 1000, (int)fps);