Message ID | CAPgnUfDSd-n5jxjX0GoMry73jA9qYcVxfD2L8KwsJY2xPZwbew@mail.gmail.com |
---|---|
State | Superseded |
Headers | show |
On 2018-09-06 19:39, Sigríður Regína Sigurþórsdóttir wrote: > + if (s->metadata_header_padding) { > + if (s->metadata_header_padding == 1) > + s->metadata_header_padding++; > + put_ebml_void(pb, s->metadata_header_padding); > + } Unfortunately I was forced to make the default -1 so you want to check that the value is greater than 0 rather than just true. Furthermore I think you will still want to add to Changelog making a note that the matroska muxer will now listen to metadata_header_padding. That may also want a micro version bump so that library users can check.
2018-09-06 21:18 GMT+02:00, James Darnley <james.darnley@gmail.com>: > On 2018-09-06 19:39, Sigríður Regína Sigurþórsdóttir wrote: >> + if (s->metadata_header_padding) { >> + if (s->metadata_header_padding == 1) >> + s->metadata_header_padding++; >> + put_ebml_void(pb, s->metadata_header_padding); >> + } > > Unfortunately I was forced to make the default -1 so you want to check > that the value is greater than 0 rather than just true. > > Furthermore I think you will still want to add to Changelog making a > note that the matroska muxer will now listen to metadata_header_padding. I don't remember a new option that warranted a Changelog entry... > That may also want a micro version bump so that library users can check. Of course! Carl Eugen
On 9/6/2018 4:18 PM, James Darnley wrote: > On 2018-09-06 19:39, Sigríður Regína Sigurþórsdóttir wrote: >> + if (s->metadata_header_padding) { >> + if (s->metadata_header_padding == 1) >> + s->metadata_header_padding++; >> + put_ebml_void(pb, s->metadata_header_padding); >> + } > > Unfortunately I was forced to make the default -1 so you want to check > that the value is greater than 0 rather than just true. > > Furthermore I think you will still want to add to Changelog making a > note that the matroska muxer will now listen to metadata_header_padding. No, this kind of change doesn't justify a Changelog entry as mentioned before. > That may also want a micro version bump so that library users can check. Micro version bump is ok. > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >
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)