From a14f0da324fdd2cdd55976b8c381a8f58402238f Mon Sep 17 00:00:00 2001 From: He Junyan Date: Mon, 22 Nov 2021 17:34:22 +0800 Subject: [PATCH] va: vpp: Fix the memory leak in fixate_caps(). For the BaseTransform class, the function of fixate_caps(), takes the ownership of "othercaps". So we should clear it in our subclass. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvavpp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c index e056e3f..6669986 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c @@ -1707,6 +1707,8 @@ gst_va_vpp_fixate_caps (GstBaseTransform * trans, GstPadDirection direction, if (!result) return othercaps; + gst_clear_caps (&othercaps); + gst_va_vpp_fixate_size (self, direction, caps, result); /* some fields might be lost while feature caps conversion */ -- 2.7.4