[vlc-commits] chromecast: use U32_AT instead of memcpy() + hton32()

Steve Lhomme git at videolan.org
Wed Dec 23 20:28:26 CET 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Wed Dec 23 12:58:41 2015 +0100| [6da28de45922bca57a112e89ef597d9fc08ae030] | committer: Jean-Baptiste Kempf

chromecast: use U32_AT instead of memcpy() + hton32()

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 70ce9bc..a41cf8d 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)



More information about the vlc-commits mailing list