diff options
author | Max Kellermann <max@duempel.org> | 2008-11-08 15:48:00 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-08 15:48:00 +0100 |
commit | 72eba30cf442994c732c135cb77c917f534ff1d7 (patch) | |
tree | 43cdc79105e4cea79296274bca00f67dfd636cb7 /src/player_thread.c | |
parent | 8cbdc2667e6f4f3713c329ae21aa3d8ae73fab24 (diff) | |
download | mpd-72eba30cf442994c732c135cb77c917f534ff1d7.tar.gz mpd-72eba30cf442994c732c135cb77c917f534ff1d7.tar.xz mpd-72eba30cf442994c732c135cb77c917f534ff1d7.zip |
decoder: converted dc.error to a dc.state value
The player did not care about the exact error value, it only checked
whether an error has occured. This could fit well into
decoder_control.state - introduce a new state "DECODE_STATE_ERROR".
Diffstat (limited to 'src/player_thread.c')
-rw-r--r-- | src/player_thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player_thread.c b/src/player_thread.c index 484c8deb7..30f876fe0 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -93,7 +93,7 @@ static int player_wait_for_decoder(struct player *player) { dc_command_wait(&pc.notify); - if (dc.error != DECODE_ERROR_NOERROR) { + if (decoder_has_failed()) { assert(dc.next_song == NULL || dc.next_song->url != NULL); pc.errored_song = dc.next_song; pc.error = PLAYER_ERROR_FILE; @@ -305,7 +305,7 @@ static void do_play(void) } if (player.decoder_starting) { - if (dc.error != DECODE_ERROR_NOERROR) { + if (decoder_has_failed()) { /* the decoder failed */ assert(dc.next_song == NULL || dc.next_song->url != NULL); pc.errored_song = dc.next_song; |