Hi! Attached patch fixes ticket #8071.
Please comment, Carl Eugen
From 8fd6cc5727b824572ba2147dfeec6f00520c9f69 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Sat, 10 Aug 2019 14:40:23 +0200 Subject: [PATCH] lavc/libx264: bit_rates > INT_MAX are not supported. Fixes ticket #8071 --- libavcodec/libx264.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index dc4b4b100d..ea44cc38c6 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -594,6 +594,10 @@ static av_cold int X264_init(AVCodecContext *avctx) PARSE_X264_OPT("weightp", wpredp); if (avctx->bit_rate) { + if (avctx->bit_rate > INT_MAX || avctx->rc_max_rate > INT_MAX) { + av_log(avctx, AV_LOG_ERROR, "bit_rate and rc_max_rate > %d not supported by libx264\n", INT_MAX); + return AVERROR(EINVAL); + } x4->params.rc.i_bitrate = avctx->bit_rate / 1000; x4->params.rc.i_rc_method = X264_RC_ABR; } -- 2.22.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".