# HG changeset patch # User mosu # Date 1162923270 0 # Node ID 9f97c2b0340fcc5aba168f0a4bf812147c1db483 # Parent 404fb439acba99a4f11d8cb7e26d07e288f9f6d2 If parsing a seek head fails then mplayer should try continue parsing the file after the seek head. diff -r 404fb439acba -r 9f97c2b0340f libmpdemux/demux_mkv.c --- a/libmpdemux/demux_mkv.c Tue Nov 07 17:37:23 2006 +0000 +++ b/libmpdemux/demux_mkv.c Tue Nov 07 18:14:30 2006 +0000 @@ -1660,6 +1660,8 @@ 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 @@ 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");