On Wed, Sep 5, 2018 at 6:29 PM James Darnley <james.darn...@gmail.com> wrote: > > On 2018-09-05 22:52, Sigríður Regína Sigurþórsdóttir wrote: > > + {"reserve_free_space", "Reserve a given amount of space at the > > beginning og the file for unspecified purpose." > > I added the "metadata_header_padding" global option many years ago. Can > you not reuse it for this purpose? Is it not likely to be "metadata" > that another software might fill this with?
Thank you for the suggestion. Here is an updated version using the "metadata_header_padding". --- libavformat/matroskaenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 09a62e1..3d8ec3c 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2005,6 +2005,11 @@ static int mkv_write_header(AVFormatContext *s) ret = AVERROR(ENOMEM); goto fail; } + if (s->metadata_header_padding) { + 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) -- 2.6.2
0001-avformat-matroskaenc-add-reserve-free-space-option.patch
Description: Binary data
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel