aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-21 20:26:57 +0100
committerMax Kellermann <max@duempel.org>2008-11-21 20:26:57 +0100
commit774417f12f91e49ef16d763538da47215c0119b2 (patch)
tree124dce382fcdfefcb0dc2aa8fc0c2288b8a73ada /src/decoder
parent63c3ebee46c8adbb477829090961a386391de276 (diff)
downloadmpd-774417f12f91e49ef16d763538da47215c0119b2.tar.gz
mpd-774417f12f91e49ef16d763538da47215c0119b2.tar.xz
mpd-774417f12f91e49ef16d763538da47215c0119b2.zip
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.
Diffstat (limited to '')
-rw-r--r--src/decoder_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 7df94e02f..a85a52e71 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) {