decoder/API: check for errors in decoder_read()

This commit is contained in:
Max Kellermann 2016-11-17 22:53:43 +01:00
parent fac610d47b
commit 746aa6cc0f

View File

@ -292,6 +292,10 @@ decoder_check_cancel_read(const Decoder *decoder)
if (decoder == nullptr)
return false;
if (decoder->error)
/* this translates to DecoderCommand::STOP */
return true;
const DecoderControl &dc = decoder->dc;
if (dc.command == DecoderCommand::NONE)
return false;