summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
-rw-r--r--src/player.c8
-rw-r--r--src/player.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 5428653..11ccd63 100644
--- a/src/main.c
+++ b/src/main.c
@@ -166,7 +166,7 @@ int main (int argc, char **argv) {
void *threadRet;
pthread_join (playerThread, &threadRet);
/* don't continue playback if thread reports error */
- if (threadRet != NULL) {
+ if (threadRet != (void *) PLAYER_RET_OK) {
curStation = NULL;
}
memset (&player, 0, sizeof (player));
diff --git a/src/player.c b/src/player.c
index 2eb6e27..051220c 100644
--- a/src/player.c
+++ b/src/player.c
@@ -404,7 +404,7 @@ static WaitressCbReturn_t BarPlayerMp3Cb (void *ptr, size_t size, void *stream)
void *BarPlayerThread (void *data) {
struct audioPlayer *player = data;
char extraHeaders[25];
- void *ret = NULL;
+ void *ret = PLAYER_RET_OK;
#ifdef ENABLE_FAAD
NeAACDecConfigurationPtr conf;
#endif
@@ -444,7 +444,7 @@ void *BarPlayerThread (void *data) {
default:
BarUiMsg (MSG_ERR, "Unsupported audio format!\n");
- return NULL;
+ return PLAYER_RET_OK;
break;
}
@@ -480,7 +480,7 @@ void *BarPlayerThread (void *data) {
break;
}
if (player->aoError) {
- ret = (void *) 0x1;
+ ret = (void *) PLAYER_RET_ERR;
}
ao_close(player->audioOutDevice);
WaitressFree (&player->waith);
@@ -493,7 +493,5 @@ void *BarPlayerThread (void *data) {
player->mode = PLAYER_FINISHED_PLAYBACK;
- /* return NULL == everything's fine, everything else: hard error, stop
- * playback */
return ret;
}
diff --git a/src/player.h b/src/player.h
index 249fc6f..4ce0fbb 100644
--- a/src/player.h
+++ b/src/player.h
@@ -99,6 +99,8 @@ struct audioPlayer {
pthread_mutex_t pauseMutex;
};
+enum {PLAYER_RET_OK = 0, PLAYER_RET_ERR = 1};
+
void *BarPlayerThread (void *data);
#endif /* _PLAYER_H */