mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
faceblur: Check CvHaarClassifierCascade is release before being modified.
For PROP_PROFILE case that exist inside gst_face_blur_set_property function loads the new XML file in the CvHaarClassifierCascade property without first checking that it is released because maybe there is an XML file previously loaded. https://bugzilla.gnome.org/show_bug.cgi?id=753994
This commit is contained in:
parent
bbd16144ca
commit
acdcfedde2
1 changed files with 2 additions and 0 deletions
|
@ -265,6 +265,8 @@ gst_face_blur_set_property (GObject * object, guint prop_id,
|
|||
switch (prop_id) {
|
||||
case PROP_PROFILE:
|
||||
g_free (filter->profile);
|
||||
if (filter->cvCascade)
|
||||
cvReleaseHaarClassifierCascade (&filter->cvCascade);
|
||||
filter->profile = g_value_dup_string (value);
|
||||
filter->cvCascade = gst_face_blur_load_profile (filter, filter->profile);
|
||||
filter->sent_profile_load_failed_msg = FALSE;
|
||||
|
|
Loading…
Reference in a new issue