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).
This commit is contained in:
parent
408d52fe39
commit
55e3aa8179
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue