mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-24 19:10:29 +00:00
threadshare/udpsink: Unconfigure all clients that are removed on clear()
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/101
This commit is contained in:
parent
3f05e448d7
commit
9cdf09d106
1 changed files with 4 additions and 1 deletions
|
@ -358,12 +358,15 @@ impl UdpSinkPadHandlerInner {
|
|||
gst_pad: &gst::Pad,
|
||||
clients_to_add: impl Iterator<Item = SocketAddr>,
|
||||
) {
|
||||
Arc::make_mut(&mut self.clients).clear();
|
||||
let old_clients = mem::replace(&mut *Arc::make_mut(&mut self.clients), vec![]);
|
||||
|
||||
self.clients_to_configure = vec![];
|
||||
self.clients_to_unconfigure = vec![];
|
||||
|
||||
for addr in clients_to_add {
|
||||
if !old_clients.contains(&addr) {
|
||||
self.clients_to_unconfigure.push(addr);
|
||||
}
|
||||
self.add_client(gst_pad, addr);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue