diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-04-30 23:16:44 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-08 13:39:24 +0200 |
commit | 7e9103535ab82b82cb2d440c205a65a7767fa060 (patch) | |
tree | fe520a55e037a2a010039d021ff2bc81b4d10e73 /doc/rate_distortion.txt | |
parent | 7c243eece3427bc5a6d54657d488d5c0c2985a8e (diff) | |
download | ffmpeg-7e9103535ab82b82cb2d440c205a65a7767fa060.tar.gz |
avformat/matroskadec: Improve handling of circular SeekHeads
There can be more than one SeekHead in a Matroska file, but most of the
other level 1 elements can only occur once.* Therefore the Matroska
demuxer only allows one entry per ID in its internal list of level 1
elements known to it; the only exception to this are SeekHeads.
The only exception to this are SeekHeads: When one is encountered
(either directly or in the list of entries read from SeekHeads),
a new entry in the list of known level-1 elements is always added,
even when this entry is actually already known.
This leads to lots of seeks in case of circular SeekHeads: Each time a
SeekHead is parsed, a new entry for a SeekHead will be added to the list
of entries read from SeekHeads. The exception for SeekHeads mentioned
above now implies that this SeekHead will always appear new and unparsed
and parsing will be attempted. This continued until the list of known
level-1 elements is full.
Fixing this is pretty simple: Don't add a new entry for a SeekHead if
its position matches the position of an already known SeekHead.
*: Actually, there can be multiple Tags and several other level 1
elements are "identically recurring" which means they may be resent
multiple times, but each instance must be absolutely identical to the
previous.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'doc/rate_distortion.txt')
0 files changed, 0 insertions, 0 deletions