v4l2: mark caps from probe as MAY_BE_LEAKED

This commit is contained in:
Guillaume Desmottes 2019-01-17 15:30:25 +01:00 committed by Nicolas Dufresne
parent bb2063f632
commit e7b84b0f6c

View file

@ -186,6 +186,10 @@ gst_v4l2_probe_and_register (GstPlugin * plugin)
basename = g_path_get_basename (it->device_path); basename = g_path_get_basename (it->device_path);
/* Caps won't be freed if the subclass is not instantiated */
GST_MINI_OBJECT_FLAG_SET (sink_caps, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
GST_MINI_OBJECT_FLAG_SET (src_caps, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
if (gst_v4l2_is_video_dec (sink_caps, src_caps)) { if (gst_v4l2_is_video_dec (sink_caps, src_caps)) {
gst_v4l2_video_dec_register (plugin, basename, it->device_path, gst_v4l2_video_dec_register (plugin, basename, it->device_path,
sink_caps, src_caps); sink_caps, src_caps);