• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Improve BlockAdditions · 52523b69
    Andreas Rheinhardt authored
    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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    52523b69
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...