0

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?

David Cairns
  • 603
  • 5
  • 18

1 Answers1

0

Actually, it seems as if the best route (for GPUImageMovie) is to just instantiate it with an AVPlayerItem, rather than trying to allow it to use its AVAsset path!

David Cairns
  • 603
  • 5
  • 18