diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-17 13:35:34 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-17 13:35:34 +0100 |
commit | b799619f48ba5fd07e91243f27f74638bcb875fb (patch) | |
tree | ddffb2e8506020dbaf07b3847e5b2378aaa35404 | |
parent | b77061b5caceb07b4487a08e48f78a5b24c15959 (diff) | |
parent | 3f5c99fcbb2c366d7bdef8500c19f43a33bdb6b9 (diff) | |
download | ffmpeg-streaming-b799619f48ba5fd07e91243f27f74638bcb875fb.zip ffmpeg-streaming-b799619f48ba5fd07e91243f27f74638bcb875fb.tar.gz |
Merge commit '3f5c99fcbb2c366d7bdef8500c19f43a33bdb6b9'
* commit '3f5c99fcbb2c366d7bdef8500c19f43a33bdb6b9':
mpegvideo_enc: export CPB props side data
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 719c7fb..136733c 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -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); |