When the input size changed, the frei0r filters didn't take
it into account and ended up corrupting memory.
Fixes #726069
GstCaps * outcaps)
{
GstFrei0rFilter *self = GST_FREI0R_FILTER (trans);
GstCaps * outcaps)
{
GstFrei0rFilter *self = GST_FREI0R_FILTER (trans);
+ GstFrei0rFilterClass *klass = GST_FREI0R_FILTER_GET_CLASS (trans);
+ gboolean destroy_f0r_instance = FALSE;
gst_video_info_init (&info);
if (!gst_video_info_from_caps (&info, incaps))
return FALSE;
gst_video_info_init (&info);
if (!gst_video_info_from_caps (&info, incaps))
return FALSE;
+ if (self->width != info.width || self->height != info.height)
+ destroy_f0r_instance = TRUE;
+
self->width = info.width;
self->height = info.height;
self->width = info.width;
self->height = info.height;
+ if (self->f0r_instance && destroy_f0r_instance) {
+ klass->ftable->destruct (self->f0r_instance);
+ self->f0r_instance = NULL;
+ }
+