mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
opencv: facedetect: free IplImage with cvReleaseImage
Using delete() with IplImage will fail to free some of the structure's contents. cvReleaseImage() is the proper way of freeing the memory.
This commit is contained in:
parent
cc8af753b9
commit
0113029fb9
1 changed files with 2 additions and 2 deletions
|
@ -223,7 +223,7 @@ gst_face_detect_finalize (GObject * obj)
|
|||
GstFaceDetect *filter = GST_FACE_DETECT (obj);
|
||||
|
||||
if (filter->cvGray)
|
||||
delete (&filter->cvGray);
|
||||
cvReleaseImage(&filter->cvGray);
|
||||
if (filter->cvStorage)
|
||||
cvReleaseMemStorage (&filter->cvStorage);
|
||||
|
||||
|
@ -501,7 +501,7 @@ gst_face_detect_set_caps (GstOpencvVideoFilter * transform, gint in_width,
|
|||
filter = GST_FACE_DETECT (transform);
|
||||
|
||||
if (filter->cvGray)
|
||||
delete (&filter->cvGray);
|
||||
cvReleaseImage(&filter->cvGray);
|
||||
|
||||
filter->cvGray = cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U,
|
||||
1);
|
||||
|
|
Loading…
Reference in a new issue