diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-11-11 19:50:04 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-11-11 19:50:04 +0100 |
commit | 7d2fa5b1bcce7351b81b2d0d927e61035c2224d9 (patch) | |
tree | 7b41294b368875b88c93896ca817f321f92f1158 /src/main.c | |
parent | b7986539c350f5de1077dd27eeffaa4c11a476f7 (diff) | |
download | pianobar-7d2fa5b1bcce7351b81b2d0d927e61035c2224d9.tar.gz pianobar-7d2fa5b1bcce7351b81b2d0d927e61035c2224d9.tar.bz2 pianobar-7d2fa5b1bcce7351b81b2d0d927e61035c2224d9.zip |
Print message and stop playback when hitting libao error
Thanks to jpfuentes2@github
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -189,7 +189,12 @@ int main (int argc, char **argv) { WardrobeSongDestroy (&scrobbleSong); /* FIXME: pthread_join blocks everything if network connection * is hung up e.g. */ - pthread_join (playerThread, NULL); + void *threadRet; + pthread_join (playerThread, &threadRet); + /* don't continue playback if thread reports error */ + if (threadRet != NULL) { + curStation = NULL; + } memset (&player, 0, sizeof (player)); } |