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

Thomas Guillem git at videolan.org
Wed Jan 31 16:25:56 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 31 16:23:56 2018 +0100| [8c4ebcd859cadd10bee834b9e5d8e2135709b2ed] | committer: Thomas Guillem

chromecast: add missing lock when closing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c4ebcd859cadd10bee834b9e5d8e2135709b2ed
---

 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