path: root/player/sub.c
diff options
authorwm4 <wm4@nowhere>2016-02-28 19:14:23 +0100
committerwm4 <wm4@nowhere>2016-02-28 19:28:34 +0100
commit92ba63079617f6579c276dd3ec54197b56378913 (patch)
treefff93c447a045a03cbc51ac4a0bac3a360220054 /player/sub.c
parentb638a413c37e8c892fcf40ca4ae29693f4942d0c (diff)
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
--- a/player/sub.c
+++ b/player/sub.c
@@ -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);