From 774417f12f91e49ef16d763538da47215c0119b2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Nov 2008 20:26:57 +0100 Subject: 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. --- src/decoder_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/decoder_api.c b/src/decoder_api.c index 7df94e02..a85a52e7 100644 --- a/src/decoder_api.c +++ b/src/decoder_api.c @@ -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) { -- cgit v1.2.3