Fixed cvRetrieveFrame memory leak under AVFoundation (ticket #1837)
This commit is contained in:
parent
cddadc04b7
commit
4b5b7bdb5a
@ -969,6 +969,8 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
|
||||
|
||||
CVPixelBufferUnlockBaseAddress(pixels, 0);
|
||||
CVBufferRelease(pixels);
|
||||
CMSampleBufferInvalidate(sampleBuffer);
|
||||
CFRelease(sampleBuffer);
|
||||
|
||||
[localpool drain];
|
||||
return bgr_image;
|
||||
|
Loading…
Reference in New Issue
Block a user