]> git.sesse.net Git - ffmpeg/commit
avformat/matroskadec: Redo EOF handling
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 16 May 2019 22:30:11 +0000 (00:30 +0200)
committerJames Almer <jamrial@gmail.com>
Tue, 16 Jul 2019 19:16:59 +0000 (16:16 -0300)
commit3ed2755baaf3f8a9f088f8c7b9cc7bd8c629e8fb
tree1161e0b82d662b2ffcfd7d5835aca54b078429ca
parent38255cdcf815ff44bb0ab10cb16b96e409f2eeed
avformat/matroskadec: Redo EOF handling

This commit closes the last hole in the system of checks for a
known-length file ending too early: Now an error message is emitted
in case the file ends directly after an EBML element.

Furthermore, this commit adds a check and a corresponding warning
whether there is data beyond the Matroska segment (only reasonable for
known-length segments). If everything looks alright, then parsing is
stopped as soon as EOF is reached (in contrast, the earlier code would
always call matroska_resync at the end).

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