I’m trying to add a fast-forward functionality in my app, which heavily uses GPUImage, but am running into some memory issues.
At the top of -[GPUImageMovie readNextVideoFrameFromOutput:]
, I replace this:
CMSampleBufferRef sampleBufferRef = [videoTrackOutput copyNextSampleBuffer];
with this:
CMSampleBufferRef sampleBufferRef = [videoTrackOutput copyNextSampleBuffer];
if(GPUImageSpeedModeFast == self.speedMode) {
sampleBufferRef = [videoTrackOutput copyNextSampleBuffer];
}
This seems to work for a few glorious seconds, but then my app is killed due to memory issues. I assume it’s the high rate of allocations, because there don’t appear to be any leaks. Anyone have experience with this? Any thoughts?