Skip Menu |

This queue is for tickets about the Audio-Scan CPAN distribution.

Report information
The Basics
Id: 95410
Status: new
Priority: 0/
Queue: Audio-Scan

People
Owner: Nobody in particular
Requestors: s.gaubert [...] senat.fr
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Audio::Scan reports incorrect APIC offset for some ID3v2.3.0 tags
Date: Tue, 06 May 2014 18:15:33 +0200
To: bug-Audio-Scan [...] rt.cpan.org
From: Stéphane Gaubert <s.gaubert [...] senat.fr>
Hello, I have discovered an issue with version 0.93 of Audio-Scan and some id3v2.3.0 tags embedded in mp3 files while trying to understand why Logitech Media Server doesn't display the artworks of many of my mp3 library while other software can handle them correctly. This bug happens while scanning the tags without loading the artwork like this perl code : local $ENV{AUDIO_SCAN_NO_ARTWORK} = 1; my $s = eval { Audio::Scan->scan_tags($file) }; The offset of the artwork contained in the APIC frame returned by Audio::Scan->scan_tags is incorrect when the ID3v2 tag's flags value is 0x80. I have identified the culprit on line 255 of src/id3.c : id3->size_remain = _id3_deunsync( buffer_ptr(id3->buf), id3->size); If I comment this line, I get the correct offset. id3->size_remain is used on line 1163 of id3.c to compute the offset of the APIC image : av_push( framedata, newSVuv(id3->offset + (id3->size - id3->size_remain) + read) ); I am afraid that commenting the _id3_deunsync call is not a acceptable fix for this issue as this call may be necessary to correctly parse the tags, but it seems to me that id3->size_remain and id3->size should be modified by the same amount in order for the offset to be correct. Maybe you should simply call _id3_deunsync without assigning its return value to id3->size_remain or else find a way to correct id3->size by the same amount. Kind regards, Stéphane -- Stéphane Gaubert SENAT Direction des Systèmes d'Information Mel : s.gaubert@senat.fr Tél : +33 (0)1 42 34 27 32 Fax : +33 (0)1 42 34 35 50 | | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT. |