vaav1enc: fix mem leaks in _av1_decide_profile

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8845>
This commit is contained in:
Stéphane Cerveau 2025-04-17 17:28:17 +02:00 committed by GStreamer Marge Bot
parent c3f4b6bdaf
commit e3ae573651

View File

@ -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;
}