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:
@@ -194,7 +194,8 @@ decoder_data(struct decoder *decoder,
|
|||||||
assert(dc.state == DECODE_STATE_DECODE);
|
assert(dc.state == DECODE_STATE_DECODE);
|
||||||
|
|
||||||
if (dc.command == DECODE_COMMAND_STOP ||
|
if (dc.command == DECODE_COMMAND_STOP ||
|
||||||
dc.command == DECODE_COMMAND_SEEK)
|
dc.command == DECODE_COMMAND_SEEK ||
|
||||||
|
length == 0)
|
||||||
return dc.command;
|
return dc.command;
|
||||||
|
|
||||||
if (is != NULL && !decoder->stream_tag_sent) {
|
if (is != NULL && !decoder->stream_tag_sent) {
|
||||||
|
Reference in New Issue
Block a user