mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 21:06:00 +00:00
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
This commit is contained in:
parent
9b128fa2e4
commit
11e7ea9df4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user