summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-05-24 02:30:44 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commita8b9ba10ac8ad3cf45aeec88f4509e7b4450af60 (patch)
treee575ed1ef05cbe2503c4142f07e9d93e7ded5a30 /demux
parentadf4d52ee8b3abf1509f8ccc12fb78ed1560b63d (diff)
downloadmpv-a8b9ba10ac8ad3cf45aeec88f4509e7b4450af60.tar.bz2
mpv-a8b9ba10ac8ad3cf45aeec88f4509e7b4450af60.tar.xz
demux: set SEEK_HR for backstep seeks, move a hr-seek detail to playloop
Just rearranging shit. Setting SEEK_HR for backstep seeks actually doesn't have much meaning, but disables the weird audio snapping for "keyframe" seeks, and I don't know it's late.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 06c2bdbbf7..89e608f891 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1259,11 +1259,7 @@ static void perform_backward_seek(struct demux_internal *in)
target -= in->opts->back_seek_size;
MP_VERBOSE(in, "triggering backward seek to get more packets\n");
-
- // Note: we don't want it to use SEEK_FORWARD, while the player frontend
- // wants it. As a fragile hack, SEEK_HR controls this.
- queue_seek(in, target, SEEK_SATAN, false);
-
+ queue_seek(in, target, SEEK_SATAN | SEEK_HR, false);
in->reading = true;
}
@@ -3231,11 +3227,6 @@ static bool queue_seek(struct demux_internal *in, double seek_pts, int flags,
bool set_backwards = flags & SEEK_SATAN;
flags &= ~(unsigned)SEEK_SATAN;
- // For HR seeks in backward playback mode, the correct seek rounding
- // direction is forward instead of backward.
- if (set_backwards && (flags & SEEK_HR))
- flags |= SEEK_FORWARD;
-
struct demux_cached_range *cache_target =
find_cache_seek_target(in, seek_pts, flags);