• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mp3 file making CAAudioFile spin in BasicRead()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mp3 file making CAAudioFile spin in BasicRead()


  • Subject: Re: mp3 file making CAAudioFile spin in BasicRead()
  • From: Stephen Davis <email@hidden>
  • Date: Wed, 14 Dec 2005 11:33:29 -0800

The file appears to have been corrupted somehow and there a bunch of bad packets in it. Not sure what is causing the audio file parser to infinite loop but the iTunes decoder asserts all over the place when playing this file and there are audible clicks and pops when the asserts fire.

As Jeff says, it's best to file a radar and attach the file so the issue can be tracked within Apple.

stephen

On Dec 14, 2005, at 11:25 AM, Jeff Moore wrote:

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:
40apple.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >mp3 file making CAAudioFile spin in BasicRead() (From: Brian Whitman <email@hidden>)
 >Re: mp3 file making CAAudioFile spin in BasicRead() (From: Jeff Moore <email@hidden>)

  • Prev by Date: QuickTime Music Synthesizer + Core Audio
  • Next by Date: Re: mp3 file making CAAudioFile spin in BasicRead()
  • Previous by thread: Re: mp3 file making CAAudioFile spin in BasicRead()
  • Next by thread: Re: mp3 file making CAAudioFile spin in BasicRead()
  • Index(es):
    • Date
    • Thread