[MPlayer-cvslog] r33325 - trunk/libmpdemux/demux_demuxers.c

reimar subversion at mplayerhq.hu
Mon Apr 25 01:27:25 CEST 2011


Author: reimar
Date: Mon Apr 25 01:27:24 2011
New Revision: 33325

Log:
Call demux_fill_buffer multiple times when trying to get a
video timestamp.

Modified:
   trunk/libmpdemux/demux_demuxers.c

Modified: trunk/libmpdemux/demux_demuxers.c
==============================================================================
--- trunk/libmpdemux/demux_demuxers.c	Mon Apr 25 01:06:38 2011	(r33324)
+++ trunk/libmpdemux/demux_demuxers.c	Mon Apr 25 01:27:24 2011	(r33325)
@@ -104,7 +104,13 @@ static void demux_demuxers_seek(demuxer_
   // Get the new pos
   pos = demuxer->video->pts;
   if (!pos) {
-    demux_fill_buffer(priv->vd, demuxer->video);
+    // since the video demuxer might provide multiple
+    // streams (e.g. subs) we might have to call
+    // demux_fill_buffer multiple times.
+    int limit = 10;
+    do {
+      demux_fill_buffer(priv->vd, demuxer->video);
+    } while (--limit && !demuxer->video->first);
     if (demuxer->video->first)
       pos = demuxer->video->first->pts;
   }


More information about the MPlayer-cvslog mailing list