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.
This commit is contained in:
Max Kellermann 2009-10-29 22:39:48 +01:00
parent 975143ab47
commit 4748decd8d

View File

@ -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;