diff options
author | Nicola Murino <nicola.murino@gmail.com> | 2011-08-17 09:42:07 +0200 |
---|---|---|
committer | Stefan Sauer <ensonic@google.com> | 2011-08-26 15:54:19 +0200 |
commit | 71a2a1be8e3931c79272dc245e4c0b90eb2a56a2 (patch) | |
tree | 5533a17a21fd30ab2138ef4826947fc105571091 /ext/opencv/MotionCells.cpp | |
parent | 5ae630489cbc6982c2f3c3c47ba3aa9664932c31 (diff) | |
download | gstreamer-plugins-bad-71a2a1be8e3931c79272dc245e4c0b90eb2a56a2.tar.gz |
Move m_pprevFrame free just before the clone of the latest frame for readability
Diffstat (limited to 'ext/opencv/MotionCells.cpp')
-rw-r--r-- | ext/opencv/MotionCells.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp index 2b81b305d..7db9896e5 100644 --- a/ext/opencv/MotionCells.cpp +++ b/ext/opencv/MotionCells.cpp @@ -168,8 +168,6 @@ MotionCells::performDetectionMotionCells (IplImage * p_frame, m_pbwImage = cvCreateImage (m_frameSize, IPL_DEPTH_8U, 1); cvPyrDown (m_pprevFrame, m_pprevDown); cvCvtColor (m_pprevDown, m_pprevgreyImage, CV_RGB2GRAY); - if (m_pprevFrame) - cvReleaseImage (&m_pprevFrame); cvPyrDown (m_pcurFrame, m_pcurDown); cvCvtColor (m_pcurDown, m_pcurgreyImage, CV_RGB2GRAY); m_pdifferenceImage = cvCloneImage (m_pcurgreyImage); @@ -268,6 +266,8 @@ MotionCells::performDetectionMotionCells (IplImage * p_frame, cvReleaseImage (&transparencyimg); } + if (m_pprevFrame) + cvReleaseImage (&m_pprevFrame); m_pprevFrame = cvCloneImage (m_pcurFrame); m_framecnt = 0; if (m_pcurFrame) |