diff options
author | Sigga Regina <siggaregina@gmail.com> | 2018-09-12 11:47:47 -0400 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-10-01 14:52:35 -0300 |
commit | dcbd89e0008f54e0ea7865b0d5dd4b644ee7da18 (patch) | |
tree | 6e3d2baf14502f39c263d81b0cc9aba5238e3488 | |
parent | d702769213487923c0fb0abe4b61f4d9ebddb88b (diff) | |
download | ffmpeg-dcbd89e0008f54e0ea7865b0d5dd4b644ee7da18.tar.gz |
avformat/matroskaenc: reserve free space for metadata on request
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/matroskaenc.c | 7 | ||||
-rw-r--r-- | libavformat/version.h | 2 |
2 files changed, 8 insertions, 1 deletions
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, \ |