-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
id3v2: Read and use frame data length indicator #63
Conversation
Probably fixes #62 |
@@ -283,6 +284,10 @@ func readID3v2Frames(r io.Reader, offset uint, h *id3v2Header) (map[string]inter | |||
} | |||
size-- | |||
} | |||
|
|||
if flags.DataLengthIndicator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec says this about compression and data length indicator flags:
This flag indicates whether or not the frame is compressed. A 'Data Length Indicator' byte MUST be included in the frame.
Maybe should be flags.Compression || flags.DataLengthIndicator
here also to be safe?
@@ -283,6 +284,10 @@ func readID3v2Frames(r io.Reader, offset uint, h *id3v2Header) (map[string]inter | |||
} | |||
size-- | |||
} | |||
|
|||
if flags.DataLengthIndicator { | |||
size = dataLengthIndicator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe all this could move into the condition above... but then there is size--
in encryption case ... move them around? don't know
Thanks for digging into this, I had a quick look yesterday but didn't get this far! Will try to look through in the next few hours. |
No description provided.