gaussblur: Fix memory leak when setting caps multiple times

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3091>
This commit is contained in:
Sebastian Dröge 2022-09-29 14:34:31 +03:00 committed by GStreamer Marge Bot
parent 0c83ddcdf7
commit a2d121cf9a

View file

@ -172,6 +172,7 @@ gst_gaussianblur_set_info (GstVideoFilter * filter, GstCaps * incaps,
/* get stride */
gb->stride = GST_VIDEO_INFO_COMP_STRIDE (in_info, 0);
n_elems = gb->stride * gb->height;
g_free (gb->tempim);
gb->tempim = g_malloc (sizeof (gfloat) * n_elems);
return TRUE;