Commit bf65a973 authored by Max Kellermann's avatar Max Kellermann

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().
parent 1388b321
...@@ -208,6 +208,8 @@ decoder_run_stream_plugin(Decoder &decoder, InputStream &is, ...@@ -208,6 +208,8 @@ decoder_run_stream_plugin(Decoder &decoder, InputStream &is,
if (!decoder_check_plugin(plugin, is, suffix)) if (!decoder_check_plugin(plugin, is, suffix))
return false; return false;
decoder.error.Clear();
tried_r = true; tried_r = true;
return decoder_stream_decode(plugin, decoder, is); return decoder_stream_decode(plugin, decoder, is);
} }
...@@ -292,6 +294,8 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix, ...@@ -292,6 +294,8 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix,
if (!plugin.SupportsSuffix(suffix)) if (!plugin.SupportsSuffix(suffix))
return false; return false;
decoder.error.Clear();
DecoderControl &dc = decoder.dc; DecoderControl &dc = decoder.dc;
if (plugin.file_decode != nullptr) { if (plugin.file_decode != nullptr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment