From acad31c2d382043f1c43c74a678de659a54a3788 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 3 May 2013 19:52:28 +0200 Subject: core: don't report byte-based playback position with dvd DVD playback uses a demuxer that signals to the frontend that timestamp resets are possible. This made the frontend calculate the OSD playback position based on the byte position and the total size of the stream. This actually broke DVD playback position display. Since DVD reports a a linear playback position, we don't have to rely on the demuxer reported position, so disable this functionality in case of DVD playback. This reverts the OSD behavior with DVD to the old behavior. --- demux/demux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'demux') diff --git a/demux/demux.c b/demux/demux.c index e1bb960e78..937c881639 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -922,6 +922,10 @@ static struct demuxer *open_given_type(struct MPOpts *opts, opts->correct_pts = demux_control(demuxer, DEMUXER_CTRL_CORRECT_PTS, NULL) == DEMUXER_CTRL_OK; + if (stream_manages_timeline(demuxer->stream)) { + // Incorrect, but fixes some behavior with DVD/BD + demuxer->ts_resets_possible = false; + } demuxer_sort_chapters(demuxer); return demuxer; } else { @@ -1071,7 +1075,7 @@ int demux_seek(demuxer_t *demuxer, float rel_seek_secs, float audio_delay, * (nothing actually implements DEMUXER_CTRL_RESYNC now). */ struct stream *stream = demuxer->stream; - if (stream->type == STREAMTYPE_DVD) { + if (stream_manages_timeline(stream)) { double pts; if (flags & SEEK_ABSOLUTE) -- cgit v1.2.3