aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sinewin_fixed_tablegen.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-05-17 00:30:14 +0200
committerJames Almer <jamrial@gmail.com>2019-07-16 16:17:00 -0300
commit5120305137436b556a23208f25b549c5d64fb38e (patch)
tree0571bc07b86cce4c70ca7c945288e64122959ffa /libavcodec/sinewin_fixed_tablegen.c
parent60f75c9976368d9921ea5cf2b9193ff8ace1602d (diff)
downloadffmpeg-5120305137436b556a23208f25b549c5d64fb38e.tar.gz
avformat/matroskadec: Don't skip too much when unseekable
The Matroska (and WebM) file format achieves forward-compability by insisting that demuxers ignore and skip elements they don't know about. Unfortunately, this complicates the detection of errors as errors resulting from loosing sync can't be reliably distinguished from unknown elements that are part of a future version of the standard. Up until now, the strategy to deal with this situation was to skip all unknown elements that are not obviously erroneous; if an error happened, it was tried to seek to the last known good position to resync from (and resync to level 1 elements). This is working fine if the input is seekable, but if it is not, then the skipped data can usually not be rechecked lateron. This is particularly acute if unknown-length clusters are in use, as the check for whether a child element exceeds the containing master element is ineffective in this situation. To remedy this, a new heuristic has been introduced: If an unknown element is encountered in non-seekable mode, an error is presumed to have happened based upon a combination of the length of the row of the already encountered unknown elements and of how far away skipping this element would take us. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/sinewin_fixed_tablegen.c')
0 files changed, 0 insertions, 0 deletions