diff options
author | Vanessa Chipirrás Navalón <vchipirras6@gmail.com> | 2015-08-26 12:47:58 +0200 |
---|---|---|
committer | Luis de Bethencourt <luis@debethencourt.com> | 2015-08-28 12:26:45 +0100 |
commit | acdcfedde27fc33dfc13a091228405c5526706f3 (patch) | |
tree | 448a64f928beca0f62fbc651489452d595907b8d /ext | |
parent | bbd16144ca4c572485a4b74f0cf10f701d867e9b (diff) | |
download | gstreamer-plugins-bad-acdcfedde27fc33dfc13a091228405c5526706f3.tar.gz |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/opencv/gstfaceblur.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/opencv/gstfaceblur.cpp b/ext/opencv/gstfaceblur.cpp index 6c9728cac..f3b6bb218 100644 --- a/ext/opencv/gstfaceblur.cpp +++ b/ext/opencv/gstfaceblur.cpp @@ -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; |