43081j / id3

A JavaScript ID3 tags parser for Node & browsers.
MIT License
335 stars 63 forks source link

bug fix for cover art Issue #21 #31

Closed defenderjim closed 5 years ago

defenderjim commented 8 years ago

This addresses the problem of images not being read correctly from MP3s. The code was always using SynchSafe to decode ints. However ID3v2.4 extended header uses synchsafe integer. Where the 'Extended header size' is the size of the whole extended header, stored as a 32 bit synchsafe integer.

But, ID3v2.3 extended header is does not use SynchSafe integer. Code modified to handle the different versions.

Also, if there is a PRIV tag in the MP3, the parsing does not complete, and the image is not read.

added support for PRIV tag fixed parsing for v3 and v3 use correct syncsafe call. parsing of images will not happen w/o priv tag code.