-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
probe: Add ParseOptions::max_junk_bytes
#227
Conversation
This allows us to sift through junk bytes to find what we need. Discovered through discussion #219.
Determined(FileType), | ||
/// The stream starts with an ID3v2 tag | ||
MaybePrecededById3(u32), | ||
/// The stream starts with junk zero bytes |
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.
Why are the zero bytes at the beginning called junk while at the end they are denoted as padding? Would it be suitable to consider both as padding to avoid introducing a new terminology?
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.
Or might junk also contain non-zero bytes? Then this comment would be imprecise.
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.
It would be junk in either case. Once it's out of the context of a tag, anything that was once padding is now garbage data. Where is it referred to as padding? It should be updated.
Or might junk also contain non-zero bytes? Then this comment would be imprecise.
It's currently only zeroes, but it could be changed to be anything. It's only a matter of time before some files come along with some other types of junk, as seen in the case of #28.
This fixes the issue for me for all the tracks I had which weren't working, so afaik it is fixed 🎉 Thanks a lot. |
Just to confirm: this is expected to work without changing any options or setting the |
Yep, |
This allows us to sift through junk bytes to find what we need.
Discovered through discussion #219.