mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set
maximum_buffer_size_ms should only be set if both are specified or if the user sets it through -svtav1-params buf-sz=val Signed-off-by: Christopher Degawa <ccom@randomderp.com>
This commit is contained in:
parent
34eeb466fb
commit
96748ac54f
@ -179,7 +179,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
|
||||
param->min_qp_allowed = avctx->qmin;
|
||||
}
|
||||
param->max_bit_rate = avctx->rc_max_rate;
|
||||
param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000LL / avctx->bit_rate;
|
||||
if (avctx->bit_rate && avctx->rc_buffer_size)
|
||||
param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000LL / avctx->bit_rate;
|
||||
|
||||
if (svt_enc->crf > 0) {
|
||||
param->qp = svt_enc->crf;
|
||||
|
Loading…
Reference in New Issue
Block a user