mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-08 21:24:57 -05:00
Properly stop playback if playback cannot start to reset player state
If the playback cannot start for a reason of another, the player state needs to be reset by calling playback_stop().
This commit is contained in:
@@ -1783,6 +1783,7 @@ playback_start(void *arg)
|
||||
{
|
||||
DPRINTF(E_LOG, L_PLAYER, "Couldn't jump to queue position %d\n", *idx_id);
|
||||
|
||||
playback_stop(NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1800,6 +1801,7 @@ playback_start(void *arg)
|
||||
{
|
||||
DPRINTF(E_LOG, L_PLAYER, "Couldn't find anything to play!\n");
|
||||
|
||||
playback_stop(NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1815,6 +1817,7 @@ playback_start(void *arg)
|
||||
{
|
||||
DPRINTF(E_LOG, L_PLAYER, "Could not open local audio\n");
|
||||
|
||||
playback_stop(NULL);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -1845,6 +1848,7 @@ playback_start(void *arg)
|
||||
{
|
||||
DPRINTF(E_LOG, L_PLAYER, "Could not start playback: no output selected or couldn't start any output\n");
|
||||
|
||||
playback_stop(NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user