[FFmpeg-cvslog] avformat/matroskaenc: reserve free space for metadata on request

Sigga Regina git at videolan.org
Mon Oct 1 20:53:31 EEST 2018


ffmpeg | branch: master | Sigga Regina <siggaregina at gmail.com> | Wed Sep 12 11:47:47 2018 -0400| [dcbd89e0008f54e0ea7865b0d5dd4b644ee7da18] | committer: James Almer

avformat/matroskaenc: reserve free space for metadata on request

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavformat/matroskaenc.c | 7 +++++++
 libavformat/version.h     | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index e88d107a90..aed83aef70 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2012,6 +2012,13 @@ static int mkv_write_header(AVFormatContext *s)
         ret = AVERROR(ENOMEM);
         goto fail;
     }
+
+    if (s->metadata_header_padding > 0) {
+        if (s->metadata_header_padding == 1)
+            s->metadata_header_padding++;
+        put_ebml_void(pb, s->metadata_header_padding);
+    }
+
     if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && mkv->reserve_cues_space) {
         mkv->cues_pos = avio_tell(pb);
         if (mkv->reserve_cues_space == 1)
diff --git a/libavformat/version.h b/libavformat/version.h
index 7032e21adc..6c996b9874 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -33,7 +33,7 @@
 // Also please add any ticket numbers that you believe might be affected here
 #define LIBAVFORMAT_VERSION_MAJOR  58
 #define LIBAVFORMAT_VERSION_MINOR  18
-#define LIBAVFORMAT_VERSION_MICRO 103
+#define LIBAVFORMAT_VERSION_MICRO 104
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                LIBAVFORMAT_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list