mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
dtlstransport: Notify ICE transport property changes
The application might track the underlying ICE transport, so not notifying changes might lead to use-after-free issues. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1688>
This commit is contained in:
parent
c9e108378a
commit
5a2e1ecb4d
1 changed files with 8 additions and 1 deletions
|
@ -64,12 +64,19 @@ void
|
|||
gst_webrtc_dtls_transport_set_transport (GstWebRTCDTLSTransport * transport,
|
||||
GstWebRTCICETransport * ice)
|
||||
{
|
||||
gboolean notify = FALSE;
|
||||
|
||||
g_return_if_fail (GST_IS_WEBRTC_DTLS_TRANSPORT (transport));
|
||||
g_return_if_fail (GST_IS_WEBRTC_ICE_TRANSPORT (ice));
|
||||
|
||||
GST_OBJECT_LOCK (transport);
|
||||
gst_object_replace ((GstObject **) & transport->transport, GST_OBJECT (ice));
|
||||
notify =
|
||||
gst_object_replace ((GstObject **) & transport->transport,
|
||||
GST_OBJECT (ice));
|
||||
GST_OBJECT_UNLOCK (transport);
|
||||
|
||||
if (notify)
|
||||
g_object_notify (G_OBJECT (transport), "transport");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue