diff options
author | wm4 <wm4@nowhere> | 2020-08-27 11:43:06 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-08-27 11:55:20 +0200 |
commit | ab6dbf0a294d695449b46c6ac1e5603fd9a8a8e7 (patch) | |
tree | cb40cb4b55c6eb36c27db890d68f97d590b51983 /player/playloop.c | |
parent | 5f89b230c77af7823f48443bdd28899f616ded45 (diff) | |
download | mpv-ab6dbf0a294d695449b46c6ac1e5603fd9a8a8e7.tar.bz2 mpv-ab6dbf0a294d695449b46c6ac1e5603fd9a8a8e7.tar.xz |
player: fix video paused condition on VO creation
Doesn't take paused_for_cache into account. For consistency; unlikely to
matter at all in practice.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c index 5b57cfa0bf..02a9c64a03 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -145,6 +145,11 @@ void update_core_idle_state(struct MPContext *mpctx) } } +bool get_internal_paused(struct MPContext *mpctx) +{ + return mpctx->opts->pause || mpctx->paused_for_cache; +} + // The value passed here is the new value for mpctx->opts->pause void set_pause_state(struct MPContext *mpctx, bool user_pause) { @@ -152,7 +157,7 @@ void set_pause_state(struct MPContext *mpctx, bool user_pause) opts->pause = user_pause; - bool internal_paused = opts->pause || mpctx->paused_for_cache; + bool internal_paused = get_internal_paused(mpctx); if (internal_paused != mpctx->paused) { mpctx->paused = internal_paused; |