summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-29 19:59:56 +0200
committerwm4 <wm4@nowhere>2014-07-29 20:04:08 +0200
commitb6a7c321db633b47590db957125337d9ec8ce9eb (patch)
treeed222638370b83573e9b79fa5c8c34a19023d2b8
parent48f4f791f4c6ab4439446d676a59c2f13bc2f342 (diff)
downloadmpv-b6a7c321db633b47590db957125337d9ec8ce9eb.tar.bz2
mpv-b6a7c321db633b47590db957125337d9ec8ce9eb.tar.xz
player: let explicitly imprecise seeks cancel precise seeks
If an imprecise seek is issues while a precise seek is ongoing, don't wait up to 300ms (herustistic which usually improves user experience), but instead let it cancel the seek. Improves responsiveness of the OSC after the previous commit. Note that we don't do this on "default-precise" seeks, because we don't know if they're going to be precise or not.
-rw-r--r--player/playloop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 42ebab302c..1bbf708740 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -371,6 +371,9 @@ void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
void execute_queued_seek(struct MPContext *mpctx)
{
if (mpctx->seek.type) {
+ // Let explicitly imprecise seeks cancel precise seeks:
+ if (mpctx->hrseek_active && mpctx->seek.exact < 0)
+ mpctx->start_timestamp = -1e9;
/* If the user seeks continuously (keeps arrow key down)
* try to finish showing a frame from one location before doing
* another seek (which could lead to unchanging display). */