Commit 040573c6 authored by Max Kellermann's avatar Max Kellermann

command/fingerprint: fix mutex locking bug

GetChromaprintCommand::DecodeStream() is called without holding the mutex.
parent bc5d4f94
...@@ -107,11 +107,10 @@ GetChromaprintCommand::DecodeStream(InputStream &input_stream, ...@@ -107,11 +107,10 @@ GetChromaprintCommand::DecodeStream(InputStream &input_stream,
/* rewind the stream, so each plugin gets a fresh start */ /* rewind the stream, so each plugin gets a fresh start */
try { try {
input_stream.Rewind(); input_stream.LockRewind();
} catch (...) { } catch (...) {
} }
const ScopeUnlock unlock(mutex);
plugin.StreamDecode(*this, input_stream); plugin.StreamDecode(*this, input_stream);
} }
......
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