diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c b/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c index 745c78d498..bda627a37f 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c @@ -1566,6 +1566,7 @@ _vp9_decide_profile (GstVaVp9Enc * self, guint rt_format, } } } + gst_caps_unref (allowed_caps); if (candidates->len == 0) { GST_ERROR_OBJECT (self, "No available profile in caps"); @@ -1620,7 +1621,7 @@ out: if (ret_profile != VAProfileNone) GST_INFO_OBJECT (self, "Decide the profile: %s", gst_va_profile_name (ret_profile)); - + g_array_unref (candidates); return ret_profile; }