From b51e1d427eae6c3604e669f220d81516ff833787 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Jan 2012 17:57:16 +0100 Subject: osd: always display pause icon when frame stepping When the OSD was enabled and the player was paused by executing the frame_step command, the OSD still displayed the icon indicating playback. Fix this and always set the proper icon when the pause state is changed. --- command.c | 2 -- mplayer.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/command.c b/command.c index be1d688f8f..58dd68454f 100644 --- a/command.c +++ b/command.c @@ -680,10 +680,8 @@ static int mp_property_pause(m_option_t *prop, int action, void *arg, case M_PROPERTY_STEP_DOWN: if (mpctx->paused) { unpause_player(mpctx); - mpctx->osd_function = OSD_PLAY; } else { pause_player(mpctx); - mpctx->osd_function = OSD_PAUSE; } return M_PROPERTY_OK; default: diff --git a/mplayer.c b/mplayer.c index 44c980f6f8..948d148f3d 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2977,6 +2977,7 @@ void pause_player(struct MPContext *mpctx) mpctx->paused = 1; mpctx->step_frames = 0; mpctx->time_frame -= get_relative_time(mpctx); + mpctx->osd_function = OSD_PAUSE; if (mpctx->video_out && mpctx->sh_video && mpctx->video_out->config_ok) vo_control(mpctx->video_out, VOCTRL_PAUSE, NULL); @@ -2990,6 +2991,8 @@ void unpause_player(struct MPContext *mpctx) if (!mpctx->paused) return; mpctx->paused = 0; + if (!mpctx->step_frames) + mpctx->osd_function = OSD_PLAY; if (mpctx->ao && mpctx->sh_audio) ao_resume(mpctx->ao); -- cgit v1.2.3