mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
webrtc: request-aux-sender, only sink floating refs
Don't add an extra ref if non-floating as that ref will never be unreffed. gst_bin_add() is transfer floating (alias to transfer none). Fixes a leak when a non-floating ref was provided as a return value in the request-aux-sender signal. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6807>
This commit is contained in:
parent
6fd1900d54
commit
c9af1d486a
1 changed files with 2 additions and 1 deletions
|
@ -7513,7 +7513,8 @@ on_rtpbin_request_aux_sender (GstElement * rtpbin, guint session_id,
|
|||
GstPad *sinkpad = gst_element_get_static_pad (aux_sender, "sink");
|
||||
GstPad *srcpad = gst_element_get_static_pad (aux_sender, "src");
|
||||
|
||||
gst_object_ref_sink (aux_sender);
|
||||
if (g_object_is_floating (aux_sender))
|
||||
aux_sender = gst_object_ref_sink (aux_sender);
|
||||
|
||||
if (!sinkpad || !srcpad) {
|
||||
GST_ERROR_OBJECT (webrtc,
|
||||
|
|
Loading…
Reference in a new issue