]> git.sesse.net Git - ffmpeg/commit
avformat/matroskaenc: Allow a custom destination for writing Tags
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 29 Apr 2020 05:52:56 +0000 (07:52 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 19 May 2020 01:15:51 +0000 (03:15 +0200)
commit4992bfe8247c917d989af45a91df5cd504344283
tree0ec76f18a0f6fa1b62bc3e5a03b2af36f7c9bea7
parent99c58e49e84e055d0a2b8f0372dfa3dbe815819b
avformat/matroskaenc: Allow a custom destination for writing Tags

Up until now, the Matroska muxer writes only one Tags level 1 element
and therefore using a certain place to store the dynamic buffer used for
writing it was hardcoded; yet the Matroska specifications allow an
unlimited amount of Tags elements and we have reason to write a second
one: If chapters are provided after writing the header, they are written
when writing the trailer; yet the corresponding tags are ignored. This
can be fixed by writing them in a second Tags element.

Also use a MatroskaMuxContext * instead of an AVFormatContext * as
parameter in mkv_write_tag() and mkv_write_tag_targets() as that is all
these functions use.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/matroskaenc.c