facedetect: remove unnecessary variable.

Memory is reserved for this variable and then released without making any
use of it.

https://bugzilla.gnome.org/show_bug.cgi?id=748377
This commit is contained in:
Vanessa Chipirrás Navalón 2015-08-21 05:26:25 +02:00 committed by Tim-Philipp Müller
parent 85834d6bbc
commit aa58ff3e46
2 changed files with 0 additions and 9 deletions

View file

@ -246,8 +246,6 @@ gst_face_detect_finalize (GObject * obj)
if (filter->cvGray) if (filter->cvGray)
cvReleaseImage (&filter->cvGray); cvReleaseImage (&filter->cvGray);
if (filter->cvStorage)
cvReleaseMemStorage (&filter->cvStorage);
g_free (filter->face_profile); g_free (filter->face_profile);
g_free (filter->nose_profile); g_free (filter->nose_profile);
@ -528,11 +526,6 @@ gst_face_detect_set_caps (GstOpencvVideoFilter * transform, gint in_width,
filter->cvGray = cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U, filter->cvGray = cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U,
1); 1);
if (!filter->cvStorage)
filter->cvStorage = cvCreateMemStorage (0);
else
cvClearMemStorage (filter->cvStorage);
return TRUE; return TRUE;
} }
@ -612,7 +605,6 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf,
} }
cvCvtColor (img, filter->cvGray, CV_RGB2GRAY); cvCvtColor (img, filter->cvGray, CV_RGB2GRAY);
cvClearMemStorage (filter->cvStorage);
gst_face_detect_run_detector (filter, filter->cvFaceDetect, gst_face_detect_run_detector (filter, filter->cvFaceDetect,
filter->min_size_width, filter->min_size_height, filter->min_size_width, filter->min_size_height,

View file

@ -109,7 +109,6 @@ struct _GstFaceDetect
cv::CascadeClassifier *cvNoseDetect; cv::CascadeClassifier *cvNoseDetect;
cv::CascadeClassifier *cvMouthDetect; cv::CascadeClassifier *cvMouthDetect;
cv::CascadeClassifier *cvEyesDetect; cv::CascadeClassifier *cvEyesDetect;
CvMemStorage *cvStorage;
}; };
struct _GstFaceDetectClass struct _GstFaceDetectClass