From 949d72e36871835e191f4174ebdde351e27e4559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 6 Mar 2023 10:03:14 +0100 Subject: [PATCH] output/PipeWire: lock thread loop in SendTag --- NEWS | 2 ++ src/output/plugins/PipeWireOutputPlugin.cxx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index ac1429960..23e59ede8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.23.13 (not yet released) * input - curl: fix busy loop after connection failed +* output + - pipewire: fix corruption bug due to missing lock ver 0.23.12 (2023/01/17) * input diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index aa5b0eb66..a97052f14 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -973,6 +973,8 @@ PipeWireOutput::SendTag(const Tag &tag) struct spa_dict dict = SPA_DICT_INIT(items, n_items); + const PipeWire::ThreadLoopLock lock(thread_loop); + auto rc = pw_stream_update_properties(stream, &dict); if (rc < 0) LogWarning(pipewire_output_domain, "Error updating properties");