Weeks ago, I posted this thread regarding problems I was having with AVAssetWriter:
http://www.iphonedevsdk.com/forum/ip...iter-woes.html
Further research seems to lead to a conflict using AVAssetWriter while playing audio with AVAudioPlayer or, really, any audio system. I tried with OpenAL as well.
Here's the background:
- Using AVAssetWriter to write frames to a video from an image or set of images works fine UNTIL [AVAudioPlayer play] is called.
- This only happens on the device, not the sim.
- The error occurs when attempting to create a pixel buffer from CVPixelBufferPoolCreatePixelBuffer.
- Once the audio starts playing, the AVAssetWriterInputPixelBufferAdaptor.pixelBufferPo ol which existed before suddely becomes nil.
You can download the representative project here:
TestAVMethods.zip
Comment out AVAudioPlayer play and it will work on the device.
Any clues are appreciated.