diff options
author | wm4 <wm4@nowhere> | 2015-03-06 20:31:54 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-03-11 12:34:26 +0900 |
commit | a424fe1296eb3284834fad0649272db9a3da56aa (patch) | |
tree | f07271b61f6f1b50236614b34461db75e43fd99a | |
parent | e09803ae6b9389cfe36b6dfda9006945ea7dc37e (diff) | |
download | mpv-a424fe1296eb3284834fad0649272db9a3da56aa.tar.bz2 mpv-a424fe1296eb3284834fad0649272db9a3da56aa.tar.xz |
demux_mkv: actually skip elements out of reach
This is missing from the previous commit. Not that harmful, but also
slightly un-nice since even a failed seek will reset the cache.
(cherry picked from commit f0ab1f2048d6d04744957d75623ca5bd04fc23fa)
-rw-r--r-- | demux/demux_mkv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 26b2d85a4c..1a3f8f0a84 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1808,7 +1808,7 @@ static int demux_mkv_open(demuxer_t *demuxer, enum demux_check check) struct header_elem *elem = &mkv_d->headers[n]; if (elem->parsed) continue; - // Warn against incomplete files. + // Warn against incomplete files and skip headers outside of range. if (elem->pos >= end) { elem->parsed = true; // don't bother if file is incomplete if (!mkv_d->eof_warning) { @@ -1816,6 +1816,7 @@ static int demux_mkv_open(demuxer_t *demuxer, enum demux_check check) "end of file - incomplete file?\n"); mkv_d->eof_warning = true; } + continue; } if (elem->id == MATROSKA_ID_CUES) { // Read cues when they are needed, to avoid seeking on opening. |