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
@ -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…
x
Reference in New Issue
Block a user