diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2019-08-10 23:52:59 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2019-08-10 23:52:59 +0200 |
commit | 690cab32326eb76cf923a4ca5eea5cc8be3a8600 (patch) | |
tree | 06a3b889c43af587559bc24538acbae8d655944b /libavcodec | |
parent | 098ed8a73e68e3aa8d6c75460daed1e38bf66e45 (diff) | |
download | ffmpeg-690cab32326eb76cf923a4ca5eea5cc8be3a8600.tar.gz |
lavc/libx264: Cast cpb bit_rates to int64_t to avoid an integer overflow.
Fixes remaining part of ticket #8071 on next version bump.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libx264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index eeffb83140..a99c1f3163 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -939,8 +939,8 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!cpb_props) return AVERROR(ENOMEM); cpb_props->buffer_size = x4->params.rc.i_vbv_buffer_size * 1000; - cpb_props->max_bitrate = x4->params.rc.i_vbv_max_bitrate * 1000; - cpb_props->avg_bitrate = x4->params.rc.i_bitrate * 1000; + cpb_props->max_bitrate = x4->params.rc.i_vbv_max_bitrate * 1000LL; + cpb_props->avg_bitrate = x4->params.rc.i_bitrate * 1000LL; // Overestimate the reordered opaque buffer size, in case a runtime // reconfigure would increase the delay (which it shouldn't). |