[FFmpeg-cvslog] mpegvideo_enc: actually add the side data with vbv_delay to the packet

Anton Khirnov git at videolan.org
Fri Dec 18 14:56:22 CET 2015


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Dec 10 22:16:13 2015 +0100| [458e53f51fc75d08df884f8e9eb3d7ded23e97b3] | committer: Anton Khirnov

mpegvideo_enc: actually add the side data with vbv_delay to the packet

Fixes 2507b5dd674834be7261772996f47ae3b95cca69

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=458e53f51fc75d08df884f8e9eb3d7ded23e97b3
---

 libavcodec/mpegvideo_enc.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 6f58585..34e008f 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1808,6 +1808,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
                 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);
+            if (ret < 0) {
+                av_freep(&props);
+                return ret;
+            }
+
 #if FF_API_VBV_DELAY
 FF_DISABLE_DEPRECATION_WARNINGS
             avctx->vbv_delay     = vbv_delay * 300;



More information about the ffmpeg-cvslog mailing list