mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-29 21:40:31 +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
|
||||
.retrieve_sender_address
|
||||
{
|
||||
let inet_addr = match saddr.ip() {
|
||||
IpAddr::V4(ip) => {
|
||||
gio::InetAddress::from_bytes(gio::InetAddressBytes::V4(&ip.octets()))
|
||||
}
|
||||
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);
|
||||
NetAddressMeta::add(
|
||||
buffer.get_mut().unwrap(),
|
||||
&gio::InetSocketAddress::from(saddr),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue