testsrcbin: Remove spurious caps unref
authorThibault Saunier <tsaunier@igalia.com>
Thu, 18 May 2023 13:27:29 +0000 (09:27 -0400)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 20 May 2023 08:59:07 +0000 (09:59 +0100)
Caps are cleared at the end of the function

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2575

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4685>

subprojects/gst-plugins-bad/gst/debugutils/gsttestsrcbin.c

index 834e2ee..02a3900 100644 (file)
@@ -343,7 +343,6 @@ gst_test_src_bin_setup_src (GstTestSrcBin * self, const gchar * srcfactory,
   capsfilter = gst_element_factory_make ("capsfilter", NULL);
   if (caps) {
     g_object_set (capsfilter, "caps", caps, NULL);
-    gst_caps_unref (caps);
   }
 
   src = gst_element_factory_make (srcfactory, NULL);