0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

dvd, bd: enable precise seeking

This should work now, at least kind of. Note that actual success depends
on the behavior of the underlying lib{dvd{nav,read},bluray}
implementation, which could go very wrong.

In the worst case, it could happen that the underlying implementation
seeks a long time before the seek target time. In this case, the player
will just decode video until the target time is reached, even if that
requires e.g. decoding 30 mintues of video before refreshing.

In the not-so-bad but still bad case, it would just miss the seek
target, and seek past it.

In my tests, it works mostly ok, though. Seeking backwards usually
fails, unless something like --hr-seek-demuxer-offset=1 is used (this
makes it seek to 1 second before the target, which may or may not be
enough to compensate for the DVD/BD imprecision).
This commit is contained in:
wm4 2014-07-06 19:03:43 +02:00
parent 7bf090ad24
commit f512604f02

View File

@ -295,10 +295,7 @@ static int d_open(demuxer_t *demuxer, enum demux_check check)
p->slave->stream_select_default = true; p->slave->stream_select_default = true;
demuxer->start_time = p->pts[STREAM_VIDEO].base_time; demuxer->start_time = p->pts[STREAM_VIDEO].base_time;
// Incorrect, but fixes some behavior
demuxer->ts_resets_possible = false;
// Doesn't work, because stream_pts is a "guess".
demuxer->accurate_seek = false;
// Can be seekable even if the stream isn't. // Can be seekable even if the stream isn't.
demuxer->seekable = true; demuxer->seekable = true;