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:
parent
1388b3219a
commit
bf65a9732c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user