aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player_control.c')
-rw-r--r--src/player_control.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/player_control.c b/src/player_control.c
index fc321b173..b7e802b9d 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -176,7 +176,8 @@ pc_set_pause(bool pause_flag)
void
pc_get_status(struct player_status *status)
{
- player_command(PLAYER_COMMAND_REFRESH);
+ player_lock();
+ player_command_locked(PLAYER_COMMAND_REFRESH);
status->state = pc.state;
@@ -186,6 +187,8 @@ pc_get_status(struct player_status *status)
status->total_time = pc.total_time;
status->elapsed_time = pc.elapsed_time;
}
+
+ player_unlock();
}
enum player_state