Commit b799619f authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit '3f5c99fc'

* commit '3f5c99fc':
  mpegvideo_enc: export CPB props side data
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents b77061b5 3f5c99fc
......@@ -286,6 +286,7 @@ av_cold int ff_dct_encode_init(MpegEncContext *s) {
av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
AVCPBProperties *cpb_props;
int i, ret, format_supported;
mpv_encode_defaults(s);
......@@ -1036,6 +1037,14 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
}
cpb_props = ff_add_cpb_side_data(avctx);
if (!cpb_props)
return AVERROR(ENOMEM);
cpb_props->max_bitrate = avctx->rc_max_rate;
cpb_props->min_bitrate = avctx->rc_min_rate;
cpb_props->avg_bitrate = avctx->bit_rate;
cpb_props->buffer_size = avctx->rc_buffer_size;
return 0;
fail:
ff_mpv_encode_end(avctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment