mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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.
This commit is contained in:
parent
51251d0fa8
commit
91eef69131
1 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue