chromecast: add missing lock when closing
authorThomas Guillem <thomas@gllm.fr>
Wed, 31 Jan 2018 15:23:56 +0000 (16:23 +0100)
committerThomas Guillem <thomas@gllm.fr>
Wed, 31 Jan 2018 15:25:33 +0000 (16:25 +0100)
modules/stream_out/chromecast/chromecast_ctrl.cpp

index 512cd42..22e3e5c 100644 (file)
@@ -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 );