mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
factory: plug pad leak in collect_streams
In gst_rtsp_media_factory_collect_streams: unref the srcpad that was retrieved using gst_element_get_static_pad. gst_ghost_pad_new will take one reference, and the other reference will otherwise give a memory leak.
This commit is contained in:
parent
ef29cc6d78
commit
aa158fa738
1 changed files with 1 additions and 0 deletions
|
@ -750,6 +750,7 @@ gst_rtsp_media_factory_collect_streams (GstRTSPMediaFactory * factory,
|
|||
|
||||
/* ghost the pad of the payloader to the element */
|
||||
stream->srcpad = gst_ghost_pad_new (name, pad);
|
||||
g_object_unref (pad);
|
||||
gst_pad_set_active (stream->srcpad, TRUE);
|
||||
gst_element_add_pad (media->element, stream->srcpad);
|
||||
gst_object_unref (elem);
|
||||
|
|
Loading…
Reference in a new issue