From bf65a9732c4fcc6a8b59b42be23f17ae4ba1b8fd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 26 Feb 2016 17:30:24 +0100 Subject: [PATCH] decoder/thread: clear Decoder::error before attempting another plugin Keep only the last error. This fixes bogus aborts due to the error check in decoder_get_virtual_command(). --- src/decoder/DecoderThread.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx index a700d4df7..9f1609a56 100644 --- a/src/decoder/DecoderThread.cxx +++ b/src/decoder/DecoderThread.cxx @@ -208,6 +208,8 @@ decoder_run_stream_plugin(Decoder &decoder, InputStream &is, if (!decoder_check_plugin(plugin, is, suffix)) return false; + decoder.error.Clear(); + tried_r = true; return decoder_stream_decode(plugin, decoder, is); } @@ -292,6 +294,8 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix, if (!plugin.SupportsSuffix(suffix)) return false; + decoder.error.Clear(); + DecoderControl &dc = decoder.dc; if (plugin.file_decode != nullptr) {