ref: 462f842e64aefb9729f1cb0eb1032d4175f44370
parent: 7d227ab829f8416de6d7fe2b3506efdbd67c8861
author: Ralph Giles <[email protected]>
date: Wed Oct 3 09:08:19 EDT 2012
Loopback packet header is host, not big, endian. This returns the proper value (2) on darwin, matching socket.h: #define AF_INET 2 /* internetwork: UDP, TCP, etc. */
--- a/src/opusrtp.c
+++ b/src/opusrtp.c
@@ -344,7 +344,8 @@
fprintf(stderr, "Packet too short for loopback\n");
return -1;
}
- loop->family = rbe32(packet);
+ /* protocol is in host byte order */
+ loop->family = *(int*)packet;
return 0;
}