opusenc, subtitleoverlay: use MAY_BE_LEAKED flag

Flag caps that are cached locally and will never be freed.

https://bugzilla.gnome.org/show_bug.cgi?id=767155
This commit is contained in:
Guillaume Desmottes 2016-06-02 13:07:01 +02:00 committed by Tim-Philipp Müller
parent 17d04998c0
commit afdb7d3f32
2 changed files with 7 additions and 0 deletions

View file

@ -812,6 +812,9 @@ gst_opus_enc_get_sink_template_caps (void)
caps = gst_caps_new_empty ();
/* The caps is cached */
GST_MINI_OBJECT_FLAG_SET (caps, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
/* Generate our two template structures */
g_value_init (&rate_array, GST_TYPE_LIST);
g_value_init (&v, G_TYPE_INT);

View file

@ -430,6 +430,10 @@ gst_subtitle_overlay_create_factory_caps (void)
gst_caps_unref (_factory_caps);
_factory_caps = gst_caps_new_empty ();
/* The caps is cached */
GST_MINI_OBJECT_FLAG_SET (_factory_caps,
GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
factories = gst_registry_feature_filter (registry,
(GstPluginFeatureFilter) _factory_filter, FALSE, &_factory_caps);
GST_DEBUG ("Created factory caps: %" GST_PTR_FORMAT, _factory_caps);