1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-14 22:22:59 +02:00
FFmpeg/libavformat
Andreas Rheinhardt 52523b6963 avformat/matroskaenc: Improve BlockAdditions
8ffcc826 added support for muxing BlockAdditions with BlockAddID equal
to one. The restriction to BlockAddID == 1 probably resulted from
a limitation to what was needed; yet over time this led to three
occurences of "(side_data_size && additional_id == 1)". This commit
changes this by setting side_data_size to 0 if additional_id != 1.

It also stops hardcoding 1 for the value of BlockAddID to write;
but it still upholds the requirement that it is 1. See below.

Despite BlockAddId actually having a default value of 1, it is still
written, because until very recently (namely dbc50f8a) our demuxer
used a wrong default value of 0.

Furthermore, use put_ebml_binary() to write the BlockAdditional element.

(The Matroska specifications have evolved and now the BlockAddID 1 is
reserved for the codec (as described in the codec's codec mapping),
BlockMore elements with BlockAddID > 1 are now of a more
codec-independent nature and require a BlockAdditionalMapping in the
track's TrackEntry. Given that this muxer does not support writing said
BlockAdditionalMapping yet (actually, none have been defined yet), we
have to uphold the requirement that BlockAddID == 1.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-03 09:04:22 +02:00
..
2020-03-17 16:08:13 +01:00
2020-03-17 22:46:36 +01:00
2020-03-17 16:05:49 +01:00
2020-03-17 16:04:42 +01:00
2020-03-17 16:08:13 +01:00
2020-02-15 10:55:33 +01:00
2020-03-17 16:08:13 +01:00
2020-02-25 19:57:16 +01:00
2020-03-14 22:07:27 +01:00
2020-03-17 22:46:36 +01:00
2020-02-16 12:54:57 +01:00
2020-03-17 22:46:36 +01:00
2020-03-08 19:08:04 +01:00
2020-03-17 16:08:13 +01:00
2020-02-20 14:41:26 +01:00
2020-03-12 18:47:39 +01:00
2020-03-26 02:39:14 +01:00