From d48a1180001987c425e45d288f3dc2edbc85c5be Mon Sep 17 00:00:00 2001 From: Alexander Gitter Date: Fri, 7 Jun 2024 13:30:30 +0200 Subject: [PATCH] Fix detection of AV1 in WebM as video/webm --- data/custom.xml | 1 + lib/marcel/tables.rb | 2 +- test/fixtures/magic/video/webm/webm.webm | Bin 0 -> 1024 bytes 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/magic/video/webm/webm.webm diff --git a/data/custom.xml b/data/custom.xml index 42b5134..6659a9f 100644 --- a/data/custom.xml +++ b/data/custom.xml @@ -83,6 +83,7 @@ + diff --git a/lib/marcel/tables.rb b/lib/marcel/tables.rb index 52e0290..6ed62b6 100644 --- a/lib/marcel/tables.rb +++ b/lib/marcel/tables.rb @@ -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']]]], diff --git a/test/fixtures/magic/video/webm/webm.webm b/test/fixtures/magic/video/webm/webm.webm new file mode 100644 index 0000000000000000000000000000000000000000..22863ea3769a3e75ae1b41ac6992bebbb2a6e91b GIT binary patch literal 1024 zcmb1gy}x+AQ(GgW({~{L)X3uWxsk)EsiizMDc7kT$Zc(8k_c`{XJi0^*_O`*eP@^K z_TAkbyt+lyb7flan#P3?o><7bY#{H3@9rL;oKVQ&^x!p3%ssxldx2b;;N3vU=Gm47 zZ@>mIFhqdNqXhuDYLnLWjm`W{4!#Y&K8a;%rj~j}=6Z$(2H}pVe3#A+hf9yZt^hgT zY27-A>zJIcH!>Cj3`$$)G^ggJx3z}FJBArHH!>y1pnw3IMkUv66B=4zz0)aDrP9}pTGwyHT< zZ$a4Z7M3Gh7@8ZI9!{L!$h5V?;duer^+_p>3dxHm`xlfJd!#0&Ffv&%HtYt=fHIlm z&En#Z$p;$JPfT@P-0kb=