mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 01:22:30 +00:00
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.
This commit is contained in:
parent
48f4f791f4
commit
b6a7c321db
@ -371,6 +371,9 @@ void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
|
|||||||
void execute_queued_seek(struct MPContext *mpctx)
|
void execute_queued_seek(struct MPContext *mpctx)
|
||||||
{
|
{
|
||||||
if (mpctx->seek.type) {
|
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)
|
/* If the user seeks continuously (keeps arrow key down)
|
||||||
* try to finish showing a frame from one location before doing
|
* try to finish showing a frame from one location before doing
|
||||||
* another seek (which could lead to unchanging display). */
|
* another seek (which could lead to unchanging display). */
|
||||||
|
Loading…
Reference in New Issue
Block a user