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().
This commit is contained in:
Max Kellermann 2016-02-26 17:30:24 +01:00
parent 1388b3219a
commit bf65a9732c

View File

@ -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) {