[vlc-devel] [PATCH 22/33] chromecast: use U32_AT instead of memcpy() + hton32()
Steve Lhomme
robux4 at videolabs.io
Wed Dec 23 12:58:41 CET 2015
---
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 c223a79..2eddff5 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -170,8 +170,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)
--
2.6.3
More information about the vlc-devel
mailing list