decoder: PCM decoder: Break loop if EOF is encountered
Otherwise the song playing might go on forever.
This commit is contained in:
parent
d9353c4fd3
commit
0b12fae84d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user