summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-rw-r--r--player/core.h1
-rw-r--r--player/playloop.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/player/core.h b/player/core.h
index e14229174e..9ece9ebb4d 100644
--- a/player/core.h
+++ b/player/core.h
@@ -293,6 +293,7 @@ typedef struct MPContext {
double last_heartbeat;
double last_metadata_update;
+ double last_idle_tick;
double mouse_timer;
unsigned int mouse_event_ts;
diff --git a/player/playloop.c b/player/playloop.c
index 9a38b52663..0b926cae36 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -1183,8 +1183,12 @@ void run_playloop(struct MPContext *mpctx)
break;
} // video
- if (!video_left || mpctx->paused)
- mp_notify(mpctx, MPV_EVENT_TICK, NULL);
+ if (!video_left || mpctx->paused) {
+ if (mp_time_sec() - mpctx->last_idle_tick > 0.5) {
+ mpctx->last_idle_tick = mp_time_sec();
+ mp_notify(mpctx, MPV_EVENT_TICK, NULL);
+ }
+ }
video_left &= mpctx->sync_audio_to_video; // force no-video semantics