summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-05-26 15:40:52 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-05-26 15:42:55 +0200
commit707eaf7684a5da186448f99e36174801d185ef36 (patch)
tree992141d955d8e7a0c0f521cc8d4882f228dc2a47 /gst
parent023af351fba4b22db782b39f4aa8ae75b70cc10f (diff)
downloadgst-plugins-bad-707eaf7684a5da186448f99e36174801d185ef36.tar.gz
gst-plugins-bad-707eaf7684a5da186448f99e36174801d185ef36.tar.bz2
gst-plugins-bad-707eaf7684a5da186448f99e36174801d185ef36.zip
rtpsource: byteswap the port from GstNetAddress
Since the port in GstNetAddress is in network order we might need to byteswap it before adding it to the source statistics.
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/rtpsource.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c
index 6a3dc604..355526ee 100644
--- a/gst/rtpmanager/rtpsource.c
+++ b/gst/rtpmanager/rtpsource.c
@@ -201,7 +201,8 @@ make_address_string (GstNetAddress * addr, gchar * dest, gulong n)
gst_netaddress_get_ip4_address (addr, &address, &port);
g_snprintf (dest, n, "%d.%d.%d.%d:%d", (address >> 24) & 0xff,
- (address >> 16) & 0xff, (address >> 8) & 0xff, address & 0xff, port);
+ (address >> 16) & 0xff, (address >> 8) & 0xff, address & 0xff,
+ g_ntohs (port));
break;
}
case GST_NET_TYPE_IP6:
@@ -216,7 +217,7 @@ make_address_string (GstNetAddress * addr, gchar * dest, gulong n)
(address[4] << 8) | address[5], (address[6] << 8) | address[7],
(address[8] << 8) | address[9], (address[10] << 8) | address[11],
(address[12] << 8) | address[13], (address[14] << 8) | address[15],
- port);
+ g_ntohs (port));
break;
}
default: