From 493b09323c6b07ea66ba3f4725c1f1831fd98222 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 17 Oct 2015 02:47:30 +0300 Subject: [PATCH] Locking fix --- source/client.cpp | 1 + source/xinestream.h | 1 + 2 files changed, 2 insertions(+) diff --git a/source/client.cpp b/source/client.cpp index 835dbbd..8c84e26 100644 --- a/source/client.cpp +++ b/source/client.cpp @@ -133,6 +133,7 @@ void Client::stream_created(XineStream &stream) stream.signal_duration_changed.connect(sigc::mem_fun(this, &Client::stream_duration_changed)); stream.signal_position_changed.connect(sigc::mem_fun(this, &Client::stream_position_changed)); + MutexLock lock(stream.get_mutex()); stream_state_changed(stream.get_state()); string title = stream.get_title(); diff --git a/source/xinestream.h b/source/xinestream.h index c03dd03..65f25ab 100644 --- a/source/xinestream.h +++ b/source/xinestream.h @@ -38,6 +38,7 @@ public: XineStream(XineEngine &, const std::string &); ~XineStream(); + Msp::Mutex &get_mutex() { return mutex; } State get_state() const { return state; } const Msp::Time::TimeDelta &get_duration() const { return duration; } const Msp::Time::TimeDelta &get_position() const { return position; } -- 2.45.2