[libav-devel] [PATCH] mpegvideo_enc: actually add the side data with vbv_delay to the packet

Vittorio Giovara vittorio.giovara at gmail.com
Thu Dec 10 22:29:50 CET 2015


On Thu, Dec 10, 2015 at 4:25 PM, Anton Khirnov <anton at khirnov.net> wrote:
> Fixes 2507b5dd674834be7261772996f47ae3b95cca69
> ---
>  libavcodec/mpegvideo_enc.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> index 4e97f4d..7a34193 100644
> --- a/libavcodec/mpegvideo_enc.c
> +++ b/libavcodec/mpegvideo_enc.c
> @@ -1804,6 +1804,13 @@ vbv_retry:
>                  return AVERROR(ENOMEM);
>              props->vbv_delay = vbv_delay * 300;
>
> +            ret = av_packet_add_side_data(pkt, AV_PKT_DATA_CPB_PROPERTIES,
> +                                          (uint8_t*)props, props_size);

nit: space before *

> +            if (ret < 0) {
> +                av_freep(&props);
> +                return ret;
> +            }
> +
>  #if FF_API_VBV_DELAY
>  FF_DISABLE_DEPRECATION_WARNINGS
>              avctx->vbv_delay     = vbv_delay * 300;
> --

ok
-- 
Vittorio


More information about the libav-devel mailing list