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:
parent
975143ab47
commit
4748decd8d
@ -472,11 +472,8 @@ play_chunk(struct song *song, struct music_chunk *chunk,
|
|||||||
|
|
||||||
/* send the chunk to the audio outputs */
|
/* send the chunk to the audio outputs */
|
||||||
|
|
||||||
if (!audio_output_all_play(chunk)) {
|
if (!audio_output_all_play(chunk))
|
||||||
pc.errored_song = dc.current_song;
|
|
||||||
pc.error = PLAYER_ERROR_AUDIO;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
pc.total_play_time += (double)chunk->length /
|
pc.total_play_time += (double)chunk->length /
|
||||||
audio_format_time_to_size(format);
|
audio_format_time_to_size(format);
|
||||||
@ -562,6 +559,8 @@ play_next_chunk(struct player *player)
|
|||||||
if (!success) {
|
if (!success) {
|
||||||
music_buffer_return(player_buffer, chunk);
|
music_buffer_return(player_buffer, chunk);
|
||||||
|
|
||||||
|
pc.error = PLAYER_ERROR_AUDIO;
|
||||||
|
|
||||||
/* pause: the user may resume playback as soon as an
|
/* pause: the user may resume playback as soon as an
|
||||||
audio output becomes available */
|
audio output becomes available */
|
||||||
pc.state = PLAYER_STATE_PAUSE;
|
pc.state = PLAYER_STATE_PAUSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user