aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-13 02:42:40 +0100
committerMax Kellermann <max@duempel.org>2008-11-13 02:42:40 +0100
commit1a3945b56331fc899c8c1a5e1e39af348fd9b4eb (patch)
tree960d02b3e03953f6ac83d6216e25fd8c5ed5fe83 /src/decoder_api.c
parent709640422c07b8f79c9ffad6ffde0d1f5f317523 (diff)
downloadmpd-1a3945b56331fc899c8c1a5e1e39af348fd9b4eb.tar.gz
mpd-1a3945b56331fc899c8c1a5e1e39af348fd9b4eb.tar.xz
mpd-1a3945b56331fc899c8c1a5e1e39af348fd9b4eb.zip
decoder: check dc.command at the beginning of decoder_data()
Seeking was somewhat broken in some decoder plugins because they sent empty chunks, and never got a command. Check the decoder command before doing anything else in decoder_data().
Diffstat (limited to 'src/decoder_api.c')
-rw-r--r--src/decoder_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 1db6797a8..c8a13709c 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -187,6 +187,10 @@ decoder_data(struct decoder *decoder,
assert(dc.state == DECODE_STATE_DECODE);
+ if (dc.command == DECODE_COMMAND_STOP ||
+ dc.command == DECODE_COMMAND_SEEK)
+ return dc.command;
+
if (is != NULL && !decoder->stream_tag_sent) {
const struct tag *src;
struct tag *tag1, *tag2;