Fixed cvRetrieveFrame memory leak under AVFoundation (ticket #1837)

This commit is contained in:
Alexander Reshetnikov 2012-04-23 16:12:24 +00:00
parent cddadc04b7
commit 4b5b7bdb5a

View File

@ -969,6 +969,8 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
CVPixelBufferUnlockBaseAddress(pixels, 0);
CVBufferRelease(pixels);
CMSampleBufferInvalidate(sampleBuffer);
CFRelease(sampleBuffer);
[localpool drain];
return bgr_image;