From 4ee147ea34057c0bcef31afed55f98b025b997dc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Nov 2013 20:57:09 +0100 Subject: DecoderAPI: stop decoder on MPD error This commit adds the basic infrastructure for reporting bugs from DecoderAPI.cxx via DecoderThread.cxx to DecoderControl. --- src/DecoderAPI.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/DecoderAPI.cxx') diff --git a/src/DecoderAPI.cxx b/src/DecoderAPI.cxx index a59999bb3..7b850265b 100644 --- a/src/DecoderAPI.cxx +++ b/src/DecoderAPI.cxx @@ -134,6 +134,10 @@ gcc_pure static DecoderCommand decoder_get_virtual_command(Decoder &decoder) { + if (decoder.error.IsDefined()) + /* an error has occurred: stop the decoder plugin */ + return DecoderCommand::STOP; + const DecoderControl &dc = decoder.dc; assert(dc.pipe != nullptr); -- cgit v1.2.3