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

Steve Lhomme git at videolan.org
Tue May 3 16:54:22 CEST 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue May  3 16:47:51 2016 +0200| [060265313b9f014e05e1fe71ce1f2fe7c48d563a] | committer: Thomas Guillem

chromecast: remove unnecessary lock as sending/receiving is in a single thread

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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)



More information about the vlc-commits mailing list