diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2013-03-09 17:36:31 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2013-03-09 17:36:31 +0100 |
commit | 2c516503d2cb81dd156afc24677ac4bf3caefceb (patch) | |
tree | f1d338134624c5aa8db26ff9c9a1779cfcef698f /src | |
parent | 1154b01448a4545d6b90aff4e3152c44e5641d2b (diff) | |
download | pianobar-windows-2c516503d2cb81dd156afc24677ac4bf3caefceb.tar.gz pianobar-windows-2c516503d2cb81dd156afc24677ac4bf3caefceb.tar.bz2 pianobar-windows-2c516503d2cb81dd156afc24677ac4bf3caefceb.zip |
Stop playback if audio file is not accessible
See #352.
Diffstat (limited to 'src')
-rw-r--r-- | src/player.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/player.c b/src/player.c index 8a46f31..6e97e46 100644 --- a/src/player.c +++ b/src/player.c @@ -530,6 +530,12 @@ void *BarPlayerThread (void *data) { ret = (void *) PLAYER_RET_ERR; } + if (wRet != WAITRESS_RET_OK && wRet != WAITRESS_RET_CB_ABORT) { + BarUiMsg (player->settings, MSG_ERR, "Cannot access audio file: %s\n", + WaitressErrorToStr (wRet)); + ret = (void *) PLAYER_RET_ERR; + } + ao_close(player->audioOutDevice); WaitressFree (&player->waith); free (player->buffer); |