diff options
author | wm4 <wm4@nowhere> | 2014-07-29 17:55:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-29 17:55:28 +0200 |
commit | 862d7d8a1a852fc6bb6dd13ca5db90f83b676579 (patch) | |
tree | 1872938f935623b207cc9fd03ac3fa2e33176d41 /player/core.h | |
parent | 6d15c491b063736d6915e74a9134d1cabde9a663 (diff) | |
download | mpv-862d7d8a1a852fc6bb6dd13ca5db90f83b676579.tar.bz2 mpv-862d7d8a1a852fc6bb6dd13ca5db90f83b676579.tar.xz |
player: fix desync when seeking and switching external tracks
If you for example use --audio-file, disable the external track, seek,
and enable the external track again, the playback position of the
external file was off, and you would get major A/V desync. This was
actually supposed to work, but broke at some time ago (probably commit
2b87415f). It didn't work, because it attempted to seek the stream if it
was already selected, which was always true due to
reselect_demux_streams() being called before that.
Fix by putting the initial selection and the seek together.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/player/core.h b/player/core.h index 49ca1e042c..0c4f50e1d2 100644 --- a/player/core.h +++ b/player/core.h @@ -414,8 +414,6 @@ struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type, int tid); bool timeline_set_part(struct MPContext *mpctx, int i, bool force); double timeline_set_from_time(struct MPContext *mpctx, double pts, bool *need_reset); -struct sh_stream *init_demux_stream(struct MPContext *mpctx, struct track *track); -void reselect_demux_streams(struct MPContext *mpctx); void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer); bool mp_remove_track(struct MPContext *mpctx, struct track *track); struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction, |