• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Don't ignore tags of chapters written late · 4ebfc13c
    Andreas Rheinhardt authored
    The Matroska muxer writes the Chapters early when chapters were already
    available when writing the header; in this case any tags pertaining to
    these chapters get written, too.
    
    Yet if no chapters had been supplied before writing the header, Chapters
    can also be written when writing the trailer if any are supplied. Tags
    belonging to these chapters were up until now completely ignored.
    
    This commit changes this: Writing the tags belonging to chapters has
    been moved to mkv_write_chapters(). If mkv_write_tags() has not been
    called yet (i.e. when chapters are written when writing the header),
    the AVIOContext for writing the ordinary Tags element is used, but not
    output, as this is left to mkv_write_tags() in order to only write one
    Tags element. Yet if mkv_write_tags() has already been called,
    mkv_write_chapters() will output a Tags element of its own which only
    contains the tags for chapters.
    
    When chapters are available initially, the corresponding tags will now
    be the first tags in the Tags element; but the ordering of tags in Tags
    is irrelevant anyway.
    
    This commit also makes chapter_id_offset local to mkv_write_chapters()
    as it is used only there and not reused at all.
    
    Potentially writing a second Tags element means that the maximum number
    of SeekHead entries had to be incremented. All the changes to FATE
    result from the ensuing increase in the amount of space reserved for the
    SeekHead (21 bytes more).
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    4ebfc13c
Name
Last commit
Last update
..
aiff Loading commit data...
al Loading commit data...
apng Loading commit data...
apng.png Loading commit data...
asf Loading commit data...
ast Loading commit data...
au Loading commit data...
avi Loading commit data...
bmp Loading commit data...
caf Loading commit data...
dpx Loading commit data...
dv Loading commit data...
dv_ntsc Loading commit data...
dv_pal Loading commit data...
flm Loading commit data...
flv Loading commit data...
gbrap.fits Loading commit data...
gbrap16be.fits Loading commit data...
gbrp.fits Loading commit data...
gbrp10le.dpx Loading commit data...
gbrp12le.dpx Loading commit data...
gbrp16be.fits Loading commit data...
gif Loading commit data...
gray.fits Loading commit data...
gray.pam Loading commit data...
gray.xwd Loading commit data...
gray16be.fits Loading commit data...
gray16be.pam Loading commit data...
gray16be.png Loading commit data...
gxf Loading commit data...
gxf_ntsc Loading commit data...
gxf_pal Loading commit data...
ircam Loading commit data...
ismv Loading commit data...
jpg Loading commit data...
mka Loading commit data...
mkv Loading commit data...
mkv_attachment Loading commit data...
mmf Loading commit data...
monob.pam Loading commit data...
monow.xwd Loading commit data...
mov Loading commit data...
mov_rtphint Loading commit data...
mp4 Loading commit data...
mpg Loading commit data...
mxf Loading commit data...
mxf_d10 Loading commit data...
mxf_dv25 Loading commit data...
mxf_dvcpro50 Loading commit data...
mxf_opatom Loading commit data...
mxf_opatom_audio Loading commit data...
nut Loading commit data...
ogg Loading commit data...
pam Loading commit data...
pbmpipe Loading commit data...
pcx Loading commit data...
peak.wav Loading commit data...
peak_only.wav Loading commit data...
pgm Loading commit data...
pgmpipe Loading commit data...
png Loading commit data...
ppm Loading commit data...
ppmpipe Loading commit data...
rgb48be.pam Loading commit data...
rgb48be.png Loading commit data...
rgb48le.dpx Loading commit data...
rgb48le_10.dpx Loading commit data...
rgb4_byte.xwd Loading commit data...
rgb555be.xwd Loading commit data...
rgb565be.xwd Loading commit data...
rgb8.xwd Loading commit data...
rgba.pam Loading commit data...
rgba.xwd Loading commit data...
rgba64le.dpx Loading commit data...
rm Loading commit data...
rso Loading commit data...
s16.voc Loading commit data...
sgi Loading commit data...
smjpeg Loading commit data...
sox Loading commit data...
sun Loading commit data...
swf Loading commit data...
tga Loading commit data...
tiff Loading commit data...
ts Loading commit data...
tta Loading commit data...
ul Loading commit data...
voc Loading commit data...
w64 Loading commit data...
wav Loading commit data...
wtv Loading commit data...
wv Loading commit data...
xbm Loading commit data...
xwd Loading commit data...
y4m Loading commit data...