Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

wader
Copy link
Contributor

@wader wader commented Apr 6, 2020

No description provided.

@wader
Copy link
Contributor Author

wader commented Apr 6, 2020

Probably fixes #62

@@ -283,6 +284,10 @@ func readID3v2Frames(r io.Reader, offset uint, h *id3v2Header) (map[string]inter
}
size--
}

if flags.DataLengthIndicator {
Copy link
Contributor Author

@wader wader Apr 6, 2020

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
Copy link
Contributor Author

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

@dhowden
Copy link
Owner

dhowden commented Apr 6, 2020

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.

@dhowden
Copy link
Owner

dhowden commented Apr 10, 2020

Closing in favour of #66

@wader Please take a look at #66 and let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants