DecoderAPI: log without holding mutex

This commit is contained in:
Max Kellermann 2013-11-08 12:15:05 +01:00
parent 2789493a5f
commit e076ff9085

View File

@ -283,11 +283,11 @@ decoder_read(Decoder *decoder,
assert(nbytes == 0 || !error.IsDefined());
assert(nbytes > 0 || error.IsDefined() || is.IsEOF());
is.Unlock();
if (gcc_unlikely(nbytes == 0 && error.IsDefined()))
LogError(error);
is.Unlock();
return nbytes;
}