aadsm / JavaScript-ID3-Reader

ID3 tags reader in JavaScript (ID3v1, ID3v2 and AAC)
http://www.aadsm.net/libraries/id3/
Other
555 stars 145 forks source link

fix bug in reading MIME type in APIC frame: the MIME is not encoded #31

Closed yangjian closed 10 years ago

yangjian commented 10 years ago

According the spec, the MIME type in APIC is pure text string without text encoding for the description.

This bug can be reproduced by adding APIC frame with UTF-16 encoding. When the text encoding is UTF-16, we will read too many bytes as MIME type, and then fail to parse the description and picture data.

aadsm commented 10 years ago

Interesting, thank you. Is this a problem you've experienced yourself? Just asking because I have seen vast amount of players / editors ignoring the spec when it comes to text encoding.

yangjian commented 10 years ago

Yes, we use ID3 reader to get tags from mp3 files, then display the picture in web page. Some of the test files can not be displayed correctly. So we try to figure out the reason.

This project is very useful for us. It works great. The data can be loaded on demand to save network bandwidth and reduce the delay. It can also parse ID3 v1 and v2. Thanks for your work.

aadsm commented 10 years ago

Cool! Nice to hear, it's merged now.

yangjian commented 10 years ago

Thanks!