[vlc-devel] [PATCH] chromecast: remove unnecessary lock as sending/receiving is in a single thread

Steve Lhomme robux4 at videolabs.io
Tue May 3 16:47:51 CEST 2016


---
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 0707082..a86c3e5 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -106,7 +106,7 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, std::string device
  , i_requestId(0)
  , has_input(false)
 {
-    vlc_mutex_init_recursive(&lock);
+    vlc_mutex_init(&lock);
     vlc_cond_init(&loadCommandCond);
 
     // Start the Chromecast event thread.
@@ -788,7 +788,6 @@ int intf_sys_t::sendMessage(const castchannel::CastMessage &msg)
     SetDWBE(p_data, i_size);
     msg.SerializeWithCachedSizesToArray(p_data + PACKET_HEADER_LEN);
 
-    vlc_mutex_locker locker(&lock);
     int i_ret = tls_Send(p_tls, p_data, PACKET_HEADER_LEN + i_size);
     delete[] p_data;
     if (i_ret == PACKET_HEADER_LEN + i_size)
-- 
2.7.0



More information about the vlc-devel mailing list