Re: Calling ExtAudioFileDispose() on a large MP4 audio file causes a crash
Re: Calling ExtAudioFileDispose() on a large MP4 audio file causes a crash
- Subject: Re: Calling ExtAudioFileDispose() on a large MP4 audio file causes a crash
- From: Christopher Liscio <email@hidden>
- Date: Mon, 16 Nov 2009 10:41:27 -0500
On Nov 5, 2009, at 11:48 AM, Rob Robson wrote:
Calling ExtAudioFileDispose() on a > 2 hour large MP4 audio file causes a crash.
* ExtAudioFileDispose() calls AudioFileClose()
* AudioFileClose() calls MP4AudioFile::Close()
* As part of closing the mp4 file, MP4AudioFile::FillGaplessString() is called
* MP4AudioFile::FillGaplessString() calls UInt32ToHexString with a sufficiently large value (value >= 0x10000000; see NOTES below)
* UInt32ToHexString() calls sprintf() with a too-small stack-allocated buffer
* At the end of UInt32ToHexString(), __stack_chk_guard is found to have been altered, and __stack_chk_fail() is called.
* __stack_chk_fail() logs a message and calls __abort(), which terminates the process.
I found a potential workaround for this, but I'd also like to find a workaround that works for my particular case... I filed rdar://7392229 for this crash, which references another radar that was filed earlier in July. The original rdar (rdar://7226263) has an attached audio file to reproduce this problem using afconvert.
A valid workaround seems to be creating a file of type kAudioFileMPEG4Type. This can handle longer duration audio encoded using AAC. But, unfortunately for me, calling ExtAudioFileCreate with kAudioFileMPEG4Type will not take an ASBD with its mFormatID set to kAudioFormatAppleLossless---it bails with !fmt.
It appears afconvert also fails with a similar incantation:
afconvert -f 'mp4f' -d 'alac' somefile.aiff outputfile.m4a
So, I'm really stuck here, because I have a shipping app (TapeDeck 1.3: http://tapedeckapp.com) that is broken in one way or another under 10.6. Either it's broken across the board in that it can't record long-duration audio (using kAudioFileM4AType), or it's broken in that it can't record lossless audio (using kAudioFileMPEG4Type).
Obviously I'll have to take the 3rd (lame) path of special-casing the ALAC case with an upper limit of recording 2h of audio in 10.6.
Any help from the list to track down a viable workaround would be greatly appreciated.
Cheers,
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden