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

reimar subversion at mplayerhq.hu
Thu Oct 5 23:28:55 CEST 2006


Author: reimar
Date: Thu Oct  5 23:28:55 2006
New Revision: 20077

Modified:
   trunk/libmpdemux/demux_demuxers.c

Log:
Fix demux_demuxers seeking if the video demuxer does not set
demuxer->video->pts (e.g. lavf).
Previous code would start audio from beginning.


Modified: trunk/libmpdemux/demux_demuxers.c
==============================================================================
--- trunk/libmpdemux/demux_demuxers.c	(original)
+++ trunk/libmpdemux/demux_demuxers.c	Thu Oct  5 23:28:55 2006
@@ -71,6 +71,11 @@
   demux_seek(priv->vd,rel_seek_secs,audio_delay,flags);
   // Get the new pos
   pos = demuxer->video->pts;
+  if (!pos) {
+    demux_fill_buffer(priv->vd, demuxer->video);
+    if (demuxer->video->first)
+      pos = demuxer->video->first->pts;
+  }
 
   if(priv->ad != priv->vd) {
     sh_audio_t* sh = (sh_audio_t*)demuxer->audio->sh;



More information about the MPlayer-cvslog mailing list