[FFmpeg-devel] [PATCH 2/2] avcodec/libsvtav1: replace vbv_bufsize with maximum_buffer_size_ms

Christopher Degawa ccom at randomderp.com
Thu Oct 20 02:11:38 EEST 2022


On Wed, Oct 19, 2022 at 7:00 PM James Almer <jamrial at gmail.com> wrote:

> On 10/19/2022 7:47 PM, Christopher Degawa wrote:
> > From: Christopher Degawa <christopher.degawa at intel.com>
> > diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
> > index 28da206cf8..74dad9892b 100644
> > --- a/libavcodec/libsvtav1.c
> > +++ b/libavcodec/libsvtav1.c
> > @@ -179,7 +179,7 @@ static int
> config_enc_params(EbSvtAv1EncConfiguration *param,
> >           param->min_qp_allowed       = avctx->qmin;
> >       }
> >       param->max_bit_rate             = avctx->rc_max_rate;
> > -    param->vbv_bufsize              = avctx->rc_buffer_size;
> > +    param->maximum_buffer_size_ms   = avctx->rc_buffer_size * 1000 /
> avctx->bit_rate;
>
> 1000LL. The multiplication could overflow otherwise.
>

Thanks, replaced locally.


More information about the ffmpeg-devel mailing list