You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ni...@apache.org on 2023/06/07 22:58:32 UTC

[tika] 02/03: AAC magic, based on PRONOM patterns found by Gregory Lepore

This is an automated email from the ASF dual-hosted git repository.

nick pushed a commit to branch TIKA-4060
in repository https://gitbox.apache.org/repos/asf/tika.git

commit ae85b9e4e4fb897ec901779fa7301c9316fb9a79
Author: Nick Burch <ni...@gagravarr.org>
AuthorDate: Wed Jun 7 23:57:46 2023 +0100

    AAC magic, based on PRONOM patterns found by Gregory Lepore
---
 .../src/main/resources/org/apache/tika/mime/tika-mimetypes.xml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
index 39c1c5891..461ad6128 100644
--- a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
+++ b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
@@ -5625,6 +5625,16 @@
   <mime-type type="audio/vorbis-config"/>
   <mime-type type="audio/x-aac">
     <glob pattern="*.aac"/>
+    <magic priority="30">
+      <!-- Without ID3 tags -->
+      <match type="regex" value="FF(F0|F1|F8|F9)(40|41|44|45|48|49|4C|4D|50|51|54|55|58|59|5C|5D|60|61|64|65|68|69|6C|6D|70|71|80|81|84|85|88|89|8C|8D|90|91|94|95|98|99|9C|9D|A0|A1|A4|A5|A8|A9|AC|AD|B0|B1)(00|01|20|40|41|60|80|81|60|A0|C0|C1|E0)" offset="0" />
+    </magic>
+    <magic priority="40">
+      <!-- With ID3 tags at the start -->
+      <match value="ID3" type="string" offset="0">
+         <match type="regex" value="FF(F0|F1|F8|F9)(40|41|44|45|48|49|4C|4D|50|51|54|55|58|59|5C|5D|60|61|64|65|68|69|6C|6D|70|71|80|81|84|85|88|89|8C|8D|90|91|94|95|98|99|9C|9D|A0|A1|A4|A5|A8|A9|AC|AD|B0|B1)(00|01|20|40|41|60|80|81|60|A0|C0|C1|E0)" offset="512:2048" />
+      </match>
+    </magic>
   </mime-type>
 
   <mime-type type="audio/x-adpcm">