summaryrefslogtreecommitdiffstats
path: root/core/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/mplayer.c')
-rw-r--r--core/mplayer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index 460862f057..21af9ca57a 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -3243,10 +3243,11 @@ static void run_playloop(struct MPContext *mpctx)
vo_check_events(vo);
if (opts->heartbeat_cmd) {
- static unsigned last_heartbeat;
unsigned now = GetTimerMS();
- if (now - last_heartbeat > 30000) {
- last_heartbeat = now;
+ if (now - mpctx->last_heartbeat >
+ (unsigned)(opts->heartbeat_interval * 1000))
+ {
+ mpctx->last_heartbeat = now;
system(opts->heartbeat_cmd);
}
}