From e3ae5736513987b0483c83be8c754ad1afbe9901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 17 Apr 2025 17:28:17 +0200 Subject: [PATCH] vaav1enc: fix mem leaks in _av1_decide_profile Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c index 6ea8ad1e58..118c684c9d 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c @@ -1946,6 +1946,7 @@ _av1_decide_profile (GstVaAV1Enc * self, guint rt_format, } } } + gst_caps_unref (allowed_caps); if (candidates->len == 0) { GST_ERROR_OBJECT (self, "No available profile in caps"); @@ -1991,7 +1992,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; }