diff options
author | wm4 <wm4@nowhere> | 2017-04-14 18:22:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-04-14 18:22:45 +0200 |
commit | 419624fb068ed4e7f449fa4fd0dda8edf161ac1c (patch) | |
tree | d74b3c2c12fdf79aa8bb8cc6f289b7b7d7e2ceca /player/video.c | |
parent | ae0a40259fa9ce45d34c966da067e20a69156330 (diff) | |
download | mpv-419624fb068ed4e7f449fa4fd0dda8edf161ac1c.tar.bz2 mpv-419624fb068ed4e7f449fa4fd0dda8edf161ac1c.tar.xz |
player: unmess pause state handling
Merge the pause_player() and unpause_player() functions. Make sure the
pause events are emitted properly. We can now set the internal pause
state based on a predicate, instead of e.g. handle_pause_on_low_cache()
making a mess to trigger the internal pause state as wanted.
Preparation for some more changes.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/video.c b/player/video.c index eecfea5482..3bbb2dc275 100644 --- a/player/video.c +++ b/player/video.c @@ -1543,8 +1543,8 @@ void write_video(struct MPContext *mpctx) if (mpctx->video_status != STATUS_EOF) { if (mpctx->step_frames > 0) { mpctx->step_frames--; - if (!mpctx->step_frames && !opts->pause) - pause_player(mpctx); + if (!mpctx->step_frames) + set_pause_state(mpctx, true); } if (mpctx->max_frames == 0 && !mpctx->stop_play) mpctx->stop_play = AT_END_OF_FILE; |