mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +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/6809>
This commit is contained in:
parent
e933c7a7e3
commit
7bebb24880
1 changed files with 2 additions and 1 deletions
|
@ -7504,7 +7504,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