Skip to content

Commit

Permalink
Fix detection of AV1 in WebM as video/webm
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandergitter committed Jun 7, 2024
1 parent 170458c commit d48a118
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<match value="webm" type="string" offset="4:4096">
<match value="V_VP8" type="string" offset="4:4096" />
<match value="V_VP9" type="string" offset="4:4096" />
<match value="V_AV1" type="string" offset="4:4096" />
</match>
</match>
</match>
Expand Down
2 changes: 1 addition & 1 deletion lib/marcel/tables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2407,7 +2407,7 @@ module Marcel
['audio/mp4', [[4, b['ftypM4A ']], [4, b['ftypM4B ']], [4, b['ftypF4A ']], [4, b['ftypF4B ']]]],
['video/quicktime', [[4, b["moov\000"]], [4, b["mdat\000"]], [4, b["free\000"]], [4, b["skip\000"]], [4, b["pnot\000"]], [4, b['ftyp']], [0, b["\000\000\000\bwide"]]]],
['video/mpeg', [[0, b["\000\000\001\263"]], [0, b["\000\000\001\272"]]]],
['video/webm', [[0, b["\032E\337\243"], [[4..4096, b["B\202"], [[4..4096, b['webm'], [[4..4096, b['V_VP8']], [4..4096, b['V_VP9']]]]]]]]]],
['video/webm', [[0, b["\032E\337\243"], [[4..4096, b["B\202"], [[4..4096, b['webm'], [[4..4096, b['V_VP8']], [4..4096, b['V_VP9']], [4..4096, b['V_AV1']]]]]]]]]],
['video/x-matroska', [[0, b["\032E\337\243\223B\202\210matroska"]]]],
['video/x-flv', [[0, b['FLV']]]],
['audio/mpeg', [[0, b["\377\362"]], [0, b["\377\363"]], [0, b["\377\364"]], [0, b["\377\365"]], [0, b["\377\366"]], [0, b["\377\367"]], [0, b["\377\372"]], [0, b["\377\373"]], [0, b["\377\374"]], [0, b["\377\375"]], [0, b["\377\377"]], [0, b['ID3']]]],
Expand Down
Binary file added test/fixtures/magic/video/webm/webm.webm
Binary file not shown.

0 comments on commit d48a118

Please sign in to comment.