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:
Julien BLACHE 2010-08-03 19:09:50 +02:00
parent d9f5e2aa40
commit 7d480faecd
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}