[vlc-devel] [PATCH 16/33] chromecast: simplify the auth payload sending

Steve Lhomme robux4 at videolabs.io
Wed Dec 23 12:58:35 CET 2015


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

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index f2dce27..2d0a100 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -260,11 +260,9 @@ void intf_sys_t::msgAuth()
 {
     castchannel::DeviceAuthMessage authMessage;
     authMessage.mutable_challenge();
-    std::string authMessageString;
-    authMessage.SerializeToString(&authMessageString);
 
-    buildMessage(NAMESPACE_DEVICEAUTH,
-        authMessageString, DEFAULT_CHOMECAST_RECEIVER, castchannel::CastMessage_PayloadType_BINARY);
+    buildMessage(NAMESPACE_DEVICEAUTH, authMessage.SerializeAsString(),
+                 DEFAULT_CHOMECAST_RECEIVER, castchannel::CastMessage_PayloadType_BINARY);
 }
 
 
-- 
2.6.3



More information about the vlc-devel mailing list