padtemplate: Directly unreference the documentation caps
authorEdward Hervey <edward@centricular.com>
Sat, 6 Jun 2020 06:24:01 +0000 (08:24 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 6 Jun 2020 06:25:16 +0000 (08:25 +0200)
The public-facing API has a (valid) protection against NULL caps. We can just
directly remove it.

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

gst/gstpadtemplate.c

index fa88a2d..a066de7 100644 (file)
@@ -230,7 +230,7 @@ gst_pad_template_dispose (GObject * object)
     gst_caps_unref (GST_PAD_TEMPLATE_CAPS (templ));
   }
 
-  gst_pad_template_set_documentation_caps (templ, NULL);
+  gst_caps_replace (&templ->ABI.abi.documentation_caps, NULL);
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }