From 040573c636c2c3780ceeb6301854dba4eb68b0e2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 May 2019 19:09:13 +0200 Subject: [PATCH] command/fingerprint: fix mutex locking bug GetChromaprintCommand::DecodeStream() is called without holding the mutex. --- src/command/FingerprintCommands.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/command/FingerprintCommands.cxx b/src/command/FingerprintCommands.cxx index e29b1e50a..be5aa3f2c 100644 --- a/src/command/FingerprintCommands.cxx +++ b/src/command/FingerprintCommands.cxx @@ -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); }