changeset 20071:672123d27ae3

Fix demux_demuxers seeking if the video demuxer does not set demuxer->video->pts (e.g. lavf). Previous code would start audio from beginning.
author reimar
date Thu, 05 Oct 2006 21:28:55 +0000
parents b4d4142f7ae8
children 3f63d6e12a1a
files libmpdemux/demux_demuxers.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_demuxers.c	Thu Oct 05 21:25:22 2006 +0000
+++ b/libmpdemux/demux_demuxers.c	Thu Oct 05 21:28:55 2006 +0000
@@ -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;