From 11e7ea9df4f36759363618bab4d1b00d8ae688b7 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 5 Oct 2006 21:28:55 +0000 Subject: [PATCH] Fix demux_demuxers seeking if the video demuxer does not set demuxer->video->pts (e.g. lavf). Previous code would start audio from beginning. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20077 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_demuxers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c index d676e82ab2..a71d80892b 100644 --- a/libmpdemux/demux_demuxers.c +++ b/libmpdemux/demux_demuxers.c @@ -71,6 +71,11 @@ static void demux_demuxers_seek(demuxer_t *demuxer,float rel_seek_secs,float aud 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;