diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-10-03 15:19:10 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-12-06 10:24:21 +0100 |
commit | 11c9bd633f635f07a762be1ecd672de55daf4edc (patch) | |
tree | 2aa24f66079131513eecef9c29f9d147cfa5d2ee /libavcodec/libopenh264enc.c | |
parent | f0b769c16daafa64720dcba7fa81a9f5255e1d29 (diff) |
libopenh264enc: export CPB props side data
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r-- | libavcodec/libopenh264enc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 0671c6f34a..da03b29d51 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -108,6 +108,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) int err = AVERROR_UNKNOWN; int log_level; WelsTraceCallback callback_function; + AVCPBProperties *props; // Mingw GCC < 4.7 on x86_32 uses an incorrect/buggy ABI for the WelsGetCodecVersion // function (for functions returning larger structs), thus skip the check in those @@ -223,6 +224,14 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) memcpy(avctx->extradata, fbi.sLayerInfo[0].pBsBuf, size); } + props = ff_add_cpb_side_data(avctx); + if (!props) { + err = AVERROR(ENOMEM); + goto fail; + } + props->max_bitrate = param.iMaxBitrate; + props->avg_bitrate = param.iTargetBitrate; + return 0; fail: |