From 3981c67e3ab0a3f4554bba08a68e02ffd9a2f2b8 Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 23 Oct 2016 08:18:38 +0200 Subject: [PATCH] [player] Do not execute the bottom half if playback_start is called while player is already playing (results in s segfault after adding new items through dacp clients) --- src/player.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/player.c b/src/player.c index 89e0bbe4..d2e85a51 100644 --- a/src/player.c +++ b/src/player.c @@ -2316,7 +2316,7 @@ playback_start_item(union player_arg *cmdarg, int *retval, struct queue_item *qi status_update(player_state); - *retval = 0; + *retval = 1; // Value greater 0 will prevent execution of the bottom half function return COMMAND_END; } @@ -2673,7 +2673,8 @@ playback_pause(void *arg, int *retval) DPRINTF(E_LOG, L_PLAYER, "Could not retrieve current position for pause\n"); playback_abort(); - return -1; + *retval = -1; + return COMMAND_END; } /* Make sure playback is still running after source_check() */