decoder/API: check for errors in decoder_read()
This commit is contained in:
parent
fac610d47b
commit
746aa6cc0f
@ -292,6 +292,10 @@ decoder_check_cancel_read(const Decoder *decoder)
|
|||||||
if (decoder == nullptr)
|
if (decoder == nullptr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (decoder->error)
|
||||||
|
/* this translates to DecoderCommand::STOP */
|
||||||
|
return true;
|
||||||
|
|
||||||
const DecoderControl &dc = decoder->dc;
|
const DecoderControl &dc = decoder->dc;
|
||||||
if (dc.command == DecoderCommand::NONE)
|
if (dc.command == DecoderCommand::NONE)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user