diff options
author | wm4 <wm4@nowhere> | 2015-03-06 20:31:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-06 20:31:54 +0100 |
commit | f0ab1f2048d6d04744957d75623ca5bd04fc23fa (patch) | |
tree | 184a2647dfb8123340e057a6328977ab4b692aa3 /demux/demux_mkv.c | |
parent | 12dcc5eaacdabb5ac56846ee81e9595857f4553e (diff) | |
download | mpv-f0ab1f2048d6d04744957d75623ca5bd04fc23fa.tar.bz2 mpv-f0ab1f2048d6d04744957d75623ca5bd04fc23fa.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.
Diffstat (limited to 'demux/demux_mkv.c')
-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 f46203111b..c9537995d8 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1807,7 +1807,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) { @@ -1815,6 +1815,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. |