vajpegdec: Set maybe-leaked flag on template caps
authorSeungha Yang <seungha@centricular.com>
Mon, 26 Dec 2022 11:53:53 +0000 (20:53 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 27 Dec 2022 17:15:20 +0000 (17:15 +0000)
The fixup function could return new caps object

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

subprojects/gst-plugins-bad/sys/va/gstvajpegdec.c

index bdde17d..33d2b8d 100644 (file)
@@ -614,7 +614,8 @@ gst_va_jpeg_dec_register (GstPlugin * plugin, GstVaDevice * device,
   /* class data will be leaked if the element never gets instantiated */
   GST_MINI_OBJECT_FLAG_SET (cdata->sink_caps,
       GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
-  GST_MINI_OBJECT_FLAG_SET (src_caps, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_MINI_OBJECT_FLAG_SET (cdata->src_caps,
+      GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
 
   type_info.class_data = cdata;