We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
flac.parseStreamInfo
STREAMINFO
I happen to have some files where the first metadata block is not a STREAMINFO, but a PICTURE (this is totally bogus, of course).
PICTURE
The problem is reported as follows:
si, ok := block.Body.(*meta.StreamInfo) if !ok { return block, fmt.Errorf("flac.parseStreamInfo: incorrect type of first metadata block; expected *meta.StreamInfo, got %T", si) }
However, thanks to the type assertion, si will always be a *meta.StreamInfo (albeit nil when !ok).
si
*meta.StreamInfo
nil
!ok
The error should probably report block.Header.Type instead.
block.Header.Type
The text was updated successfully, but these errors were encountered:
Hi @chucklebot!
Nice catch, I made a PR with a fix. Would you be kind and test your "bogus" file and see if the problem persists? #49
Happy new years, btw 🎆 Cheers Henry & Robin
Sorry, something went wrong.
Looks good to me! I didn't realize you'd made your PR when I got up this morning and so I just did a similar one (#50). Feel free to close it!
Many happy returns, hope you'll have a great 2022!
Fixed in #49.
Successfully merging a pull request may close this issue.
I happen to have some files where the first metadata block is not a
STREAMINFO
, but aPICTURE
(this is totally bogus, of course).The problem is reported as follows:
However, thanks to the type assertion,
si
will always be a*meta.StreamInfo
(albeitnil
when!ok
).The error should probably report
block.Header.Type
instead.The text was updated successfully, but these errors were encountered: