mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/libx265: Fix integer overflow in computation of max and avg bitrate
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
93016f5d1d
commit
e3b5897fe3
|
@ -310,8 +310,8 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
|
|||
if (!cpb_props)
|
||||
return AVERROR(ENOMEM);
|
||||
cpb_props->buffer_size = ctx->params->rc.vbvBufferSize * 1000;
|
||||
cpb_props->max_bitrate = ctx->params->rc.vbvMaxBitrate * 1000;
|
||||
cpb_props->avg_bitrate = ctx->params->rc.bitrate * 1000;
|
||||
cpb_props->max_bitrate = ctx->params->rc.vbvMaxBitrate * 1000LL;
|
||||
cpb_props->avg_bitrate = ctx->params->rc.bitrate * 1000LL;
|
||||
|
||||
if (!(avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER))
|
||||
ctx->params->bRepeatHeaders = 1;
|
||||
|
|
Loading…
Reference in New Issue