diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-02 21:02:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-02 21:10:36 +0200 |
commit | d9b56895b5812e59ebda42b7d8ce221bd50f9f03 (patch) | |
tree | 8325fa9c426e01b2fc434fcc52193b69f9a622cb /libavcodec/ratecontrol.c | |
parent | 5b6a50e15006d758ba308d5576a450406cd433f6 (diff) |
avcodec/mpegvideo: change bit_rate to 64bit
32bit is not sufficient for all cases
Fixes: signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 989816e689..308e34ee18 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -890,7 +890,7 @@ 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 " - "size:%d var:%"PRId64"/%"PRId64" br:%d fps:%d\n", + "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, @@ -1057,9 +1057,9 @@ static int init_pass2(MpegEncContext *s) } av_assert0(toobig <= 40); av_log(s->avctx, AV_LOG_DEBUG, - "[lavc rc] requested bitrate: %d bps expected bitrate: %d bps\n", + "[lavc rc] requested bitrate: %"PRId64" bps expected bitrate: %"PRId64" bps\n", s->bit_rate, - (int)(expected_bits / ((double)all_available_bits / s->bit_rate))); + (int64_t)(expected_bits / ((double)all_available_bits / s->bit_rate))); av_log(s->avctx, AV_LOG_DEBUG, "[lavc rc] estimated target average qp: %.3f\n", (float)qscale_sum / rcc->num_entries); |