nvdec: Don't leak template caps when registering elements with old NVIDIA driver
authorSebastian Dröge <sebastian@centricular.com>
Tue, 4 Feb 2020 09:31:43 +0000 (11:31 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 5 Feb 2020 09:49:20 +0000 (09:49 +0000)
sys/nvcodec/gstnvdec.c

index 00c9539..a65f238 100644 (file)
@@ -1804,8 +1804,12 @@ gst_nvdec_plugin_init (GstPlugin * plugin, guint device_index,
       gst_nvdec_subclass_register (plugin, GST_TYPE_NVDEC, codec_map[i].codec,
           codec_map[i].codec_name, device_index, GST_RANK_PRIMARY,
           sink_templ, src_templ);
+
+      gst_clear_caps (&sink_templ);
     }
 
+    gst_clear_caps (&src_templ);
+
     return;
   }