diff --git a/modules/highgui/src/cap_ios_video_camera.mm b/modules/highgui/src/cap_ios_video_camera.mm index 45db2b60a1..42fd75555e 100644 --- a/modules/highgui/src/cap_ios_video_camera.mm +++ b/modules/highgui/src/cap_ios_video_camera.mm @@ -557,6 +557,8 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}; withPresentationTime:lastSampleTime] ) { NSLog(@"Video Writing Error"); } + if (pixelBuffer != nullptr) + CVPixelBufferRelease(pixelBuffer); } }