Commit 0b12fae8 authored by Simon Kagstrom's avatar Simon Kagstrom Committed by Max Kellermann

decoder: PCM decoder: Break loop if EOF is encountered

Otherwise the song playing might go on forever.
parent d9353c4f
......@@ -51,6 +51,10 @@ pcm_stream_decode(struct decoder *decoder, struct input_stream *is)
size_t nbytes = decoder_read(decoder, is,
buffer, sizeof(buffer));
if (nbytes == 0 && input_stream_eof(is))
break;
cmd = nbytes > 0
? decoder_data(decoder, is,
buffer, nbytes, 0)
......
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