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

fix: Add support for MP3 without ID3 header #652

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

shc261392
Copy link
Contributor

Changes in this pull request

MP3 files does not necessarily have ID3 header and the current version will always raise "unsupported type" error when an file is MP3 format but has no ID3 header. Getting the ID3 header in MP3 file handler only serves the purpose of skipping the size of the header, hence when the MP3 file does not have an ID3 header, we could check for the MP3 header sync word (11 bits of 1) to make sure it is a valid MP3 file instead and skip 0 bytes as there is no ID3 header to skip.

This change would enable c2pa-rs to work with MP3 files that lack ID3 headers.

Checklist

  • [v] This PR represents a single feature, fix, or change.
  • [v] All applicable changes have been documented.
  • [v] Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@shc261392
Copy link
Contributor Author

@mauricefisher64 Hi could you check on this pull request? This is identical to #588 except I used a personal fork to enable maintainer contribution so that you may edit it if needed.

@scouten-adobe scouten-adobe changed the title feat(sdk/src/asset_handlers/mp3_io.rs): add support for mp3 without I… feat(sdk): Add support for MP3 without ID3 header Nov 7, 2024
@mauricefisher64
Copy link
Collaborator

Can you bring the branch up to date with main. I will try to merge it then.

…D3 header

Signed-off-by: James Chien <james@numbersprotocol.io>
@mauricefisher64 mauricefisher64 changed the title feat(sdk): Add support for MP3 without ID3 header fix(sdk): Add support for MP3 without ID3 header Nov 20, 2024
@mauricefisher64 mauricefisher64 changed the title fix(sdk): Add support for MP3 without ID3 header fix: Add support for MP3 without ID3 header Nov 21, 2024
Copy link
Collaborator

@mauricefisher64 mauricefisher64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mauricefisher64 mauricefisher64 merged commit 738fb61 into contentauth:main Nov 21, 2024
25 of 26 checks passed
@scouten-adobe scouten-adobe mentioned this pull request Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants