command/fingerprint: fix mutex locking bug

GetChromaprintCommand::DecodeStream() is called without holding the mutex.
This commit is contained in:
Max Kellermann 2019-05-07 19:09:13 +02:00
parent bc5d4f9494
commit 040573c636

View File

@ -107,11 +107,10 @@ GetChromaprintCommand::DecodeStream(InputStream &input_stream,
/* rewind the stream, so each plugin gets a fresh start */
try {
input_stream.Rewind();
input_stream.LockRewind();
} catch (...) {
}
const ScopeUnlock unlock(mutex);
plugin.StreamDecode(*this, input_stream);
}