summaryrefslogtreecommitdiff
path: root/src/decoder/DecoderAPI.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-17 22:53:43 +0100
committerMax Kellermann <max@musicpd.org>2016-11-17 22:53:43 +0100
commit746aa6cc0f3b5bda3b06642b924db99fd2b03aa4 (patch)
tree39e8d15947c79d2baf6b47d02f4f00f0a089a22c /src/decoder/DecoderAPI.cxx
parentfac610d47b46e93fd5743d0a6b891eacab8c7e45 (diff)
decoder/API: check for errors in decoder_read()
Diffstat (limited to 'src/decoder/DecoderAPI.cxx')
-rw-r--r--src/decoder/DecoderAPI.cxx4
1 files changed, 4 insertions, 0 deletions
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;