mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-07 16:49:52 +00:00
Move m_pprevFrame free just before the clone of the latest frame for readability
This commit is contained in:
parent
5ae630489c
commit
71a2a1be8e
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue