wiztrust / php-reader

Automatically exported from code.google.com/p/php-reader
0 stars 0 forks source link

Defect/failure: the script is completely hanging on some mp3 files, evtl corrupt files #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

i have some files, where the id3v2 is completely hanging, it throws no exeption 
it rans only in the global timeout.
if i use id3v1 class with the same file everything is working.
i don't know how i should debug this. 
Tell me what i have todo and i will support.

greetz and thx

Original issue reported on code.google.com by mr.schic...@gmail.com on 20 Jan 2012 at 9:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,

the code is very simple:

require_once 'Zend/Media/Id3v2.php'; // or using autoload

        try {
                    $id3 = new Zend_Media_Id3v2('Music/top_100_12-12-2011/087 - David Guetta feat. Taio Cruz & Ludacris - Little Bad Girl.mp3');
                    $title = $id3->tit2->text;
                    $artist = $id3->tpe1->text;
        }
        catch (Zend_Media_Id3_Exception $e) {
                    $title = $dateiname;
                    $artist = $folder;
        }

        echo $artist." - ".$title."\n";

but the file is under copyright. please give me an email adress where i can 
send it

Original comment by mr.schic...@gmail.com on 21 Jan 2012 at 5:00

GoogleCodeExporter commented 9 years ago
I have now checked your file and it seems that your ID3v2 is not encoded 
according to the standard. The SYLT frame is encoded wrongly having the 
descriptions without null terminations. The standard says in 
http://www.id3.org/d3v2.3.0 for SYLT that strings must be null terminated.

I have made a workaround to the library code so that the code won't hang for 
this particular case. It is committed to subversion. Checkout the repository 
and try it yourself.

Original comment by svollbehr on 21 Jan 2012 at 7:47

GoogleCodeExporter commented 9 years ago
it is working perfectly, thank you very much!

Original comment by mr.schic...@gmail.com on 22 Jan 2012 at 2:00

GoogleCodeExporter commented 9 years ago

Original comment by svollbehr on 22 Jan 2012 at 4:21