[vlc-commits] chromecast: add missing lock when closing

Thomas Guillem git at videolan.org
Thu Feb 1 11:26:33 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 31 16:23:56 2018 +0100| [773e5a912f4ecee614d07ad1620a3393e45c6f11] | committer: Thomas Guillem

chromecast: add missing lock when closing

(cherry picked from commit 8c4ebcd859cadd10bee834b9e5d8e2135709b2ed)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=773e5a912f4ecee614d07ad1620a3393e45c6f11
---

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 512cd42ab1..22e3e5c181 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -133,6 +133,7 @@ intf_sys_t::~intf_sys_t()
 {
     var_Destroy( m_module->obj.parent->obj.parent, CC_SHARED_VAR_NAME );
 
+    vlc_mutex_lock(&m_lock);
     switch ( m_state )
     {
     case Ready:
@@ -153,6 +154,7 @@ intf_sys_t::~intf_sys_t()
     default:
         break;
     }
+    vlc_mutex_unlock(&m_lock);
 
     vlc_interrupt_kill( m_ctl_thread_interrupt );
 



More information about the vlc-commits mailing list