Hi Till, On Thu, 2009-01-29 at 10:30 -0500, Jason Tackaberry wrote: > Would it possible to send me (directly, not to the list) the MP3 file > that's causing the problem?
I received the file you sent privately. I thought I'd reply to the mailing list for the record. On Thu, 2009-01-29 at 18:28 +0100, Till Klister wrote: > Please tell me, if you know what exactly causes the loop and if it is > an infinite one or just a very long one. It's not infinite, it's just very long. The problem is that the file is filled with \xff, which is the start-of-header byte that is searched for. So it finds \xff, then checks the next 4 bytes to see if it's a valid header, and it isn't, so it increments 1 byte, and repeats until the contents of the file is exhausted. This is basically what MPlayer (via libavformat) does too, it's just much faster as it's written in C. Anyway, I have rewritten the find_header() function to be more efficient and more correct. I've also added a specific check for the contents filled with \xff, which is the pathological worst-case the algorithm could encounter. The change is committed to svn. Your sample just happened to hit a corner case, is all. :) The performance should be much better now. Thanks, Jason. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel