Movement by a single frame in CMTime and AVFoundation
I'm attempting to play a video with AVFoundation. I am using the following code for a button that advances the playback by one frame. It works intermittently, on some executions it will do the right thing and advance one frame, but most times I will have to press the button 3 or 4 times before it will advance a frame. This makes me think it is some kind of precision issue, but I can't figure out what it is. Each time it is run the new CMTime appears to be advancing by the same amount. My other theory is that it could be caused by the currentTime not being set to an exact frame boundary at my