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
This commit is contained in:
mosu 2006-11-07 18:14:30 +00:00
parent 8abf4e3f17
commit 9c4d028084
1 changed files with 9 additions and 0 deletions

View File

@ -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");