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 MP4 matcher #30

Merged
merged 2 commits into from
Dec 12, 2017
Merged

Fix MP4 matcher #30

merged 2 commits into from
Dec 12, 2017

Conversation

RangelReale
Copy link
Contributor

With information from http://www.file-recovery.com/mp4-signature-format.htm.

I tested on many MP4 files I have here, all were detected.

I redid the implementation in a way that makes it easier to add more 4-byte codes, as it seems there are many of them.

See if this way is ok with your, or you prefer it done the way it were before.

@h2non
Copy link
Owner

h2non commented Dec 12, 2017

Thank you.

Apparently, there are a few redundant or expressions:
https://travis-ci.org/h2non/filetype/jobs/315430402#L519-L536

@RangelReale
Copy link
Contributor Author

Ops, fixed.

@h2non h2non merged commit d97515e into h2non:master Dec 12, 2017
@yiiTT
Copy link
Contributor

yiiTT commented Dec 18, 2017

This does not seem to work correctly due to the case-sensitivity.
For example it does not match "66 74 79 70 4D 53 4E 56 01 00 25 00" which would be "ftypeMSNV"

@yiiTT yiiTT mentioned this pull request Dec 18, 2017
@RangelReale
Copy link
Contributor Author

I've found this site which lists all known "ftyp"s, and it seems to have the correct case, for MSNV it is upper case indeed.
I'll fix it with this list.

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.

3 participants