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
Failed to parse vorbis comment spanning pages #7065
Comments
Could you please upload an example file (in the best case both the original mp3 and the converted opus file)? |
Here is is, both mp3 and opus file are included. |
Thanks for the files! I think we had that with other files as well, where AntennaPod thinks that the comment is over but it is actually in the middle of the image. I didn't know about ogg pages (or that the comments can span over multiple pages). As you say, it must be because the image overlaps a page border. Given your comment, it looks like you have researched quite a bit before writing this issue. This means you likely know more about the file format than I do. Would you be interested in writing a PR that fixes this? If not, I'm not sure how soon I (or anyone else) would start working on this, given that there are so many other open issues. Maybe a solution would be to write a custom Some links (mainly for myself, so I can find them again): |
Yes, I'm willing to write a PR. However, this may take some time, considering that I haven't written Android code for a while. |
For development, it might help adding your test file as a unit test here: https://github.com/AntennaPod/AntennaPod/blob/develop/parser/media/src/test/java/de/danoeh/antennapod/parser/media/vorbis/VorbisCommentMetadataReaderTest.java Then the development can all be done using the test, no need to run the full app on an Android device or any manual testing. Second advantage: Then we have a regression test :) Let me know if there is anything I can help you with when setting up the project |
Thanks for the advice! |
Checklist
App version
3.3.2
Where did you get the app from
Google Play
Android version
14
Device model
No response
First occurred
No response
Steps to reproduce
comment
ID3 tagffmpeg -i file.mp3 -f flac - | opusenc - file.opus
comment
tag exists in converted fileExpected behaviour
Comment "Summary" displayed in shownotes.
Current behaviour
Shownotes not showing up. And log reports
User comment unrealistically long. key=jKd2/zT71n, length=2004374095
.After digging into code and file content, I guess that's because
VorbisCommentReader
expect that all comments fit within a single page. But the embedded coverMETADATA_BLOCK_PICTURE
was too big so it's divided into n pages. In result,readUserComment()
failed to skip wholeMETADATA_BLOCK_PICTURE
segment. Thus next time,readUserComment()
will read from somewhere withinMETADATA_BLOCK_PICTURE
rather than beginning of next field.Logs
The text was updated successfully, but these errors were encountered: