mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
frei0r: Correctly clean up elements to be reusable and not leak memory
This commit is contained in:
parent
72fca8a828
commit
0647d963ef
3 changed files with 15 additions and 0 deletions
|
@ -59,6 +59,8 @@ gst_frei0r_filter_stop (GstBaseTransform * trans)
|
|||
self->f0r_instance = NULL;
|
||||
}
|
||||
|
||||
self->width = self->height = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,8 +45,16 @@ gst_frei0r_mixer_reset (GstFrei0rMixer * self)
|
|||
self->f0r_instance = NULL;
|
||||
}
|
||||
|
||||
if (self->property_cache)
|
||||
gst_frei0r_property_cache_free (klass->properties, self->property_cache,
|
||||
klass->n_properties);
|
||||
self->property_cache = NULL;
|
||||
|
||||
gst_caps_replace (&self->caps, NULL);
|
||||
gst_event_replace (&self->newseg_event, NULL);
|
||||
|
||||
self->fmt = GST_VIDEO_FORMAT_UNKNOWN;
|
||||
self->width = self->height = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -146,6 +146,11 @@ gst_frei0r_src_stop (GstBaseSrc * basesrc)
|
|||
self->f0r_instance = NULL;
|
||||
}
|
||||
|
||||
self->fmt = GST_VIDEO_FORMAT_UNKNOWN;
|
||||
self->width = self->height = 0;
|
||||
self->fps_n = self->fps_d = 0;
|
||||
self->n_frames = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue