Commit 55e3aa81 authored by Max Kellermann's avatar Max Kellermann

output_thread: return from ao_play() if chunk->next is NULL

When the "next" chunk to be played is NULL, return from ao_play() immediately, without going over the "while" loop (no-op).
parent 408d52fe
......@@ -332,12 +332,11 @@ ao_play(struct audio_output *ao)
if (chunk != NULL)
/* continue the previous play() call */
chunk = chunk->next;
else {
else
chunk = music_pipe_peek(ao->pipe);
if (chunk == NULL)
/* no chunk available */
return false;
}
if (chunk == NULL)
/* no chunk available */
return false;
ao->chunk_finished = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment