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);
|
CVPixelBufferUnlockBaseAddress(pixels, 0);
|
||||||
CVBufferRelease(pixels);
|
CVBufferRelease(pixels);
|
||||||
|
CMSampleBufferInvalidate(sampleBuffer);
|
||||||
|
CFRelease(sampleBuffer);
|
||||||
|
|
||||||
[localpool drain];
|
[localpool drain];
|
||||||
return bgr_image;
|
return bgr_image;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user