diff options
author | Max Kellermann <max@duempel.org> | 2009-10-29 22:39:48 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-29 22:39:48 +0100 |
commit | 4748decd8df52f747605271fac18f94437b78e0c (patch) | |
tree | d37f4043a81dd6fd0341e1f9371a4696e5ab3133 | |
parent | 975143ab474a020723f333e2dd7bb064038623d4 (diff) | |
download | mpd-4748decd8df52f747605271fac18f94437b78e0c.tar.gz mpd-4748decd8df52f747605271fac18f94437b78e0c.tar.xz mpd-4748decd8df52f747605271fac18f94437b78e0c.zip |
player_thread: set error status in play_next_chunk()
Don't set the error in play_chunk(); do all the error handling in the
caller. The errored_song attribute isn't set anymore; it doesn't make
sense for PLAYER_ERROR_AUDIO.
Diffstat (limited to '')
-rw-r--r-- | src/player_thread.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/player_thread.c b/src/player_thread.c index 1794ad404..9d13e44f9 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -472,11 +472,8 @@ play_chunk(struct song *song, struct music_chunk *chunk, /* send the chunk to the audio outputs */ - if (!audio_output_all_play(chunk)) { - pc.errored_song = dc.current_song; - pc.error = PLAYER_ERROR_AUDIO; + if (!audio_output_all_play(chunk)) return false; - } pc.total_play_time += (double)chunk->length / audio_format_time_to_size(format); @@ -562,6 +559,8 @@ play_next_chunk(struct player *player) if (!success) { music_buffer_return(player_buffer, chunk); + pc.error = PLAYER_ERROR_AUDIO; + /* pause: the user may resume playback as soon as an audio output becomes available */ pc.state = PLAYER_STATE_PAUSE; |