vavp9enc: fix mem leaks in _vp9_decide_profile

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

View File

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