diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2021-08-11 09:23:46 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2021-08-11 09:28:59 +0300 |
commit | b969e1c74e7c905a96c1590f5350a264dbaa83ae (patch) | |
tree | 99aab7944f5e882159ceb0e3be3c339458dd3380 /data | |
parent | ddc78deeee16d3cab4322122aa3133cc3c083f07 (diff) | |
download | shared-mime-info-b969e1c74e7c905a96c1590f5350a264dbaa83ae.tar.gz |
audio/vnd.dts.hd: include parent type magic in magic match
Matching just 0x64582025 within the first 18725 bytes of any file is
prone to false positives.
The priority of the magic match here being bumped to 60 seems to
indicate intent to make it take precedence over the parent
`audio/vnd.dts`. But we should take the parent magic into account here
as it does not "inherit" with `sub-class-of`.
As the comment for this match says "16bits HD be", accept only "16bits
core be" as the parent at least for now, not all possible parent
magics -- it would not seem consistent to have it in "14bits"
variants, or the "16bits core le" one. The test case we have for this
is one matching "16bits core be".
Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/166
Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/167
Diffstat (limited to 'data')
-rw-r--r-- | data/freedesktop.org.xml.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index 8796aa52..934e2e5c 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -4145,7 +4145,9 @@ command to generate the output files. <comment>DTSHD audio</comment> <sub-class-of type="audio/vnd.dts"/> <magic priority="60"> - <match type="big32" value="0x64582025" offset="0:18725"/> <!-- 16bits HD be --> + <match type="big32" value="0x7FFE8001" offset="0"> <!-- 16bits core be --> + <match type="big32" value="0x64582025" offset="4:18725"/> <!-- 16bits HD be --> + </match> </magic> <alias type="audio/x-dtshd"/> <glob pattern="*.dtshd"/> |