rtsp-media: fix leak when adding converter

Free the previous caps before reusing the variable for the converter caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/204>
This commit is contained in:
Doug Nazar 2021-05-04 20:47:18 -04:00 committed by GStreamer Marge Bot
parent 4c6e57ad33
commit 6c9d6fd986

View file

@ -504,6 +504,7 @@ pad_added_cb (GstElement * uribin, GstPad * pad, GstElement * element)
/* unref old pad, we reffed before */ /* unref old pad, we reffed before */
gst_object_unref (pad); gst_object_unref (pad);
gst_caps_unref (caps);
/* continue with new pad and caps */ /* continue with new pad and caps */
pad = gst_element_get_static_pad (convert, "src"); pad = gst_element_get_static_pad (convert, "src");