Re: mp3 file making CAAudioFile spin in BasicRead()
Re: mp3 file making CAAudioFile spin in BasicRead()
- Subject: Re: mp3 file making CAAudioFile spin in BasicRead()
- From: Jeff Moore <email@hidden>
- Date: Wed, 14 Dec 2005 11:25:17 -0800
The file appears to put the parser into some kind of infinite loop.
The best thing for you to do is to file a bug that includes the file.
You should also provide a sample(1) trace of the afinfo process
rather than a backtrace from stopping in GDB. That will give a better
overall picture of what's going on in the process.
On Dec 13, 2005, at 10:08 PM, Brian Whitman wrote:
While testing my app (it uses CAAudioFile as a simple "anything to
PCM" converter) on my iTunes library, I found one mp3 file (linked
below) that completely hangs the program. On investigation the same
file hangs any app I could find that uses CAAudioFile during the
file->open call. It plays fine in iTunes and QT, I don't remember
the provenance of the file but iTunes claims it was encoded with
iTunes 4.9.
It's frustrating as I don't want malformed songs to hang my app,
there seems to be no way of getting out of the loop or detecting if
it will happen. Looking a debug trace shows:
CAAudioFile::GetExistingFileInfo
CAAudioFile::InitFileMaxPacketSize
AudioFileProperty
MP3AudioFile::GetProperty
MP3AudioFile::UpdatePacketTable
MP3AudioFile::GetFPosForNextSyncWord
Cached_DataSource::ReadBytes
MacFile_DataSource::ReadBytes
FSReadFork
PBReadForkSync
BasicRead (which spins and eats up all CPU)
How to replicate: build the AudioFileTools.
cd /Developer/Examples/CoreAudio/Services/AudioFileTools/build...
curl -O http://variogr.am/clarity.mp3
./afinfo clarity.mp3
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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