From 419624fb068ed4e7f449fa4fd0dda8edf161ac1c Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 14 Apr 2017 18:22:45 +0200 Subject: 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. --- player/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/video.c') 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; -- cgit v1.2.3