views:

143

answers:

0

Hi all,

I'm working on an iPhone app that requires both live capture frames and the ability to take full resolution photos. This requires switching from AVCaptureVideoDataOutput to AVCaptureStillImageOutput and back. I do this by having 2 outputs, and changing the preset according to the needed state.

This is the code that is called after taking an image to return to live capture:

[session beginConfiguration];
session.sessionPreset = previousSessionPreset;
[session commitConfiguration];

Thing is it works most of the time, but sometime the last line of code will be called but never return. The app is stuck on the commitConfiguration line, and doesn't continue.

Anyone ran into this? The documentation mentions nothing of it, or a possible erroneous state...

Thanks!
Oded.