aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ismindex.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-05-17 00:30:16 +0200
committerJames Almer <jamrial@gmail.com>2019-07-16 16:17:00 -0300
commit3c70b941d5d1f756cf4e141c3c7ee921478ec300 (patch)
treed2379cd8f9347a10a0fb7a0cd782523d28e8eb6e /tools/ismindex.c
parent04b62bd7ceb45d338799768a9c8b139f5b0ad77e (diff)
downloadffmpeg-3c70b941d5d1f756cf4e141c3c7ee921478ec300.tar.gz
avformat/matroskadec: Accept more unknown-length elements
The current Matroska specifications mandate that only two elements may use an unknown-length length: Segments and clusters. But this was not always so: For the greater part of Matroska's existence, all master elements were allowed to make use of the unknown-length feature. And there were muxers creating such files: For several years libavformat's Matroska muxer used unknown-length for all master elements when the output wasn't seekable. This only stopped in March 2010 with 2529bb30. And even afterwards it was possible (albeit unlikely) for libavformat to create unknown-length master elements that are in violation of today's specifications, namely if the master element was so big that the seek backwards to update the size could no longer be performed inside the AVIOContext's write buffer. This has only been fixed in October 2016 (with the patches that introduced support for writing CRC-32 elements). Libavformat's Matroska demuxer meanwhile has never really supported unknown-length elements besides segments and clusters. Support for the latter was hardcoded. This commit changes this: Now all master elements for which a syntax to parse them is available are supported. This includes the files produced by old versions of libavformat's muxer. More precisely, master elements that have unknown length and are about to be parsed (not skipped) are supported; only a warning is emitted for them. For normal files, this means that level 1 elements after the clusters that are encountered after the clusters have been parsed (i.e. not because they are referenced by the seekhead at the beginning of the file) are still unsupported (they would be skipped at this point if their length were known). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'tools/ismindex.c')
0 files changed, 0 insertions, 0 deletions