[MPlayer-cvslog] r20750 - trunk/libmpdemux/demux_mkv.c

mosu subversion at mplayerhq.hu
Tue Nov 7 19:14:30 CET 2006


Author: mosu
Date: Tue Nov  7 19:14:30 2006
New Revision: 20750

Modified:
   trunk/libmpdemux/demux_mkv.c

Log:
If parsing a seek head fails then mplayer should try continue parsing the file after the seek head.

Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	(original)
+++ trunk/libmpdemux/demux_mkv.c	Tue Nov  7 19:14:30 2006
@@ -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");



More information about the MPlayer-cvslog mailing list