]> git.sesse.net Git - ffmpeg/commit
avformat/matroskadec: Improve check for level 1 duplicates
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 16 May 2019 22:30:21 +0000 (00:30 +0200)
committerJames Almer <jamrial@gmail.com>
Tue, 16 Jul 2019 19:18:10 +0000 (16:18 -0300)
commit806ac7da6927c1a9db2d6bc7af272733078964a0
tree211684c9f7bfa53d350ce7355f26a6e7f09000cf
parent730ac1ae803925777702eeaef4d1b8b796126e8f
avformat/matroskadec: Improve check for level 1 duplicates

If a file uses unknown-length level 1 elements besides clusters and such
elements are after the first cluster, then these elements will usually
be parsed twice: Once during parsing of the file header and once when
reading the file reaches the position where these elements are located.
The second time the element is parsed leads to a "Duplicate element"
error message. Known-length elements are not affected by this as they
are skipped except during parsing the header.

This commit fixes this by explicitly adding a check for whether the
position of the element to be parsed is the same as the position of the
already known level 1 element.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/matroskadec.c