【问题标题】:Issue with OpenCV 3.0 - Recording Video memory leakOpenCV 3.0 的问题 - 录制视频内存泄漏
【发布时间】:2015-10-18 07:23:54
【问题描述】:

对不起,一个老问题,但我没有发现对我有帮助。我正在使用 OpenCV 3.0 框架开发一个 iOS 应用程序。

我正在使用 cvVideoCamera delgate 录制视频,但是当我设置 _cvVideoCam.recordVideo = YES; 时,它总是给我内存警告错误。 如果我设置cvVideoCam,recordVideo = YES;,那么没有任何内存警告,而且输出 url 总是在位置显示(null),在录制完成时。

提前致谢。

【问题讨论】:

    标签: c++ ios opencv ios8 opencv3.0


    【解决方案1】:
        please check your
    
        -(void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer.....
    
         for - 
                                                         withPresentationTime:lastSampleTime] ) 
        {
                             NSLog(@"Video Writing Error");
                         }
                        if (pixelBuffer != nullptr)
                            CVPixelBufferRelease(pixelBuffer);
                     }
    
                 }
    
    because, in some of earlier version OpenCV forgot to release memory upon each append operation to MPEG4 output. May be its your need.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-17
      • 2022-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-28
      相关资源
      最近更新 更多