diff options
author | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-07 18:14:30 +0000 |
---|---|---|
committer | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-07 18:14:30 +0000 |
commit | 9c4d0280849acb2973f5abcc4511b6cdd28fe6ca (patch) | |
tree | f7ad36a921d3ee8eb4afd577e3c86751807acb9b | |
parent | 8abf4e3f175a3f78902d17e0f57ec2fec0c283a3 (diff) |
If parsing a seek head fails then mplayer should try continue parsing the file after the seek head.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20750 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_mkv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 0b28536bc4..0efd3ab6e2 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -1660,6 +1660,8 @@ demux_mkv_read_seekhead (demuxer_t *demuxer) mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] /---- [ parsing seek head ] ---------\n"); length = ebml_read_length (s, NULL); + /* off now holds the position of the next element after the seek head. */ + off = stream_tell (s) + length; while (length > 0 && !res) { @@ -1747,6 +1749,13 @@ demux_mkv_read_seekhead (demuxer_t *demuxer) stream_seek (s, saved_pos); } + if (res) + { + /* If there was an error then try to skip this seek head. */ + if (stream_seek (s, off)) + res = 0; + } + else if (length > 0) stream_seek (s, stream_tell (s) + length); mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] \\---- [ parsing seek head ] ---------\n"); |