decoder: ignore decoder_data() calls with length==0

Pushing buffers with a zero length into the MPD core causes failures;
don't let them pass beyond the decoder plugi API.
This commit is contained in:
Max Kellermann 2008-11-21 20:26:57 +01:00
parent 63c3ebee46
commit 774417f12f
1 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,8 @@ decoder_data(struct decoder *decoder,
assert(dc.state == DECODE_STATE_DECODE);
if (dc.command == DECODE_COMMAND_STOP ||
dc.command == DECODE_COMMAND_SEEK)
dc.command == DECODE_COMMAND_SEEK ||
length == 0)
return dc.command;
if (is != NULL && !decoder->stream_tag_sent) {