Commit dcbd89e0 authored by Sigga Regina's avatar Sigga Regina Committed by James Almer

avformat/matroskaenc: reserve free space for metadata on request

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent d7027692
......@@ -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)
......
......@@ -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, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment