From 6da28de45922bca57a112e89ef597d9fc08ae030 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robUx4@videolabs.io>
Date: Wed, 23 Dec 2015 12:58:41 +0100
Subject: [PATCH] chromecast: use U32_AT instead of memcpy() + hton32()

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
 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 70ce9bc66a92..a41cf8d04c18 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -173,8 +173,7 @@ extern "C" int recvPacket(sout_stream_t *p_stream, bool &b_msgReceived,
     // We receive the payload.
 
     // Get the size of the payload
-    memcpy(&i_payloadSize, p_data, PACKET_HEADER_LEN);
-    i_payloadSize = hton32(i_payloadSize);
+    i_payloadSize = U32_AT( p_data );
     const uint32_t i_maxPayloadSize = PACKET_MAX_LEN - PACKET_HEADER_LEN;
 
     if (i_payloadSize > i_maxPayloadSize)
-- 
GitLab