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().
This commit is contained in:
Max Kellermann 2008-11-13 02:42:40 +01:00
parent 709640422c
commit 1a3945b563
1 changed files with 4 additions and 0 deletions

View File

@ -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;