mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-20 17:16:39 +00:00
threadshare/udpsrc: SocketAddr to InetSocketAddress direct conversion
This commit is contained in:
parent
9c48de75d8
commit
178c7155a3
1 changed files with 4 additions and 10 deletions
|
@ -454,16 +454,10 @@ impl TaskImpl for UdpSrcTask {
|
||||||
.await
|
.await
|
||||||
.retrieve_sender_address
|
.retrieve_sender_address
|
||||||
{
|
{
|
||||||
let inet_addr = match saddr.ip() {
|
NetAddressMeta::add(
|
||||||
IpAddr::V4(ip) => {
|
buffer.get_mut().unwrap(),
|
||||||
gio::InetAddress::from_bytes(gio::InetAddressBytes::V4(&ip.octets()))
|
&gio::InetSocketAddress::from(saddr),
|
||||||
}
|
);
|
||||||
IpAddr::V6(ip) => {
|
|
||||||
gio::InetAddress::from_bytes(gio::InetAddressBytes::V6(&ip.octets()))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
let inet_socket_addr = &gio::InetSocketAddress::new(&inet_addr, saddr.port());
|
|
||||||
NetAddressMeta::add(buffer.get_mut().unwrap(), inet_socket_addr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue