• Andreas Rheinhardt's avatar
    avformat/matroskadec: Don't skip too much when unseekable · 51203051
    Andreas Rheinhardt authored
    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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    51203051
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...
.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...