From 746aa6cc0f3b5bda3b06642b924db99fd2b03aa4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Nov 2016 22:53:43 +0100 Subject: [PATCH] decoder/API: check for errors in decoder_read() --- src/decoder/DecoderAPI.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx index d673311e9..a16fd3a36 100644 --- a/src/decoder/DecoderAPI.cxx +++ b/src/decoder/DecoderAPI.cxx @@ -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;