|author||wm4 <wm4@nowhere>||2016-02-28 19:14:23 +0100|
|committer||wm4 <wm4@nowhere>||2016-02-28 19:28:34 +0100|
demux: remove relative seeking
Ever since a change in mplayer2 or so, relative seeks were translated to absolute seeks before sending them to the demuxer in most cases. The only exception in current mpv is DVD seeking. Remove the SEEK_ABSOLUTE flag; it's not the implied default. SEEK_FACTOR is kept, because it's sometimes slightly useful for seeking in things like transport streams. (And maybe mkv files without duration set?) DVD seeking is terrible because DVD and libdvdnav are terrible, but mostly because libdvdnav is terrible. libdvdnav does not expose seeking with seek tables. (Although I know xbmc/kodi use an undocumented API that is not declared in the headers by dladdr()ing it - I think the function is dvdnav_jump_to_sector_by_time().) With the current mpv policy if not giving a shit about DVD, just revert our half-working seek hacks and always use dvdnav_time_search(). Relative seeking might get stuck sometimes; in this case --hr-seek=always is recommended.
Diffstat (limited to 'player/sub.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/player/sub.c b/player/sub.c
index 6b2a3664dc..6892ac935b 100644
@@ -103,7 +103,7 @@ static bool update_subtitle(struct MPContext *mpctx, double video_pts,
// Assume fully_read implies no interleaved audio/video streams.
// (Reading packets will change the demuxer position.)
- demux_seek(track->demuxer, 0, SEEK_ABSOLUTE);
+ demux_seek(track->demuxer, 0, 0);
track->preloaded = sub_read_all_packets(track->d_sub);