avformat/matroskaenc: reserve free space for metadata on request

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Sigga Regina 2018-09-12 11:47:47 -04:00 committed by James Almer
parent d702769213
commit dcbd89e000
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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, \