Package: file
Version: 4.26-1
Severity: wishlist
Tags: patch

*** Please type your report below this line ***
Currently, DTS WAV files don't have their codec detected; the attached
patch against the current Debian git repository fixes that. It does
not have any impact outside of making codec detection slightly more
specific for WAV files.

Please see http://wiki.multimedia.cx/index.php?title=DTS for the
source of the codec ID numbers used in the patch.

It should be noted that most DTS WAV files in the wild don't have
correct headers; they're marked as PCM WAV to work around broken CD
burning software.[1] However, the correct codec numbers are used to
parse DTS WAV files without forcing a decoder in, for instance,
ffmpeg, so the field is used in at least one circumstance.

[1] http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-February/007704.html
From e748fb9b078f1b496d6f4e91f8499cf6c005e0e3 Mon Sep 17 00:00:00 2001
From: Adam Buchbinder <[EMAIL PROTECTED]>
Date: Fri, 5 Dec 2008 18:12:20 -0500
Subject: [PATCH] Add detection of DTS WAV files.

According to http://wiki.multimedia.cx/index.php?title=DTS, codec ID
0x0008 represents "Microsoft DTS", while 0x2001 represents "DTS".
---
 debian/patches/00list                      |    1 +
 debian/patches/219-magic-update-wav.dpatch |   25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100755 debian/patches/219-magic-update-wav.dpatch

diff --git a/debian/patches/00list b/debian/patches/00list
index eb0cc7e..82c74bf 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -15,6 +15,7 @@
 216-magic-update-llvm.dpatch
 217-magic-update-ruby.dpatch
 218-magic-update-gimp.dpatch
+219-magic-update-wav.dpatch
 320-magic-add-par2.dpatch
 321-magic-add-pe5.dpatch
 322-magic-add-pmenu.dpatch
diff --git a/debian/patches/219-magic-update-wav.dpatch b/debian/patches/219-magic-update-wav.dpatch
new file mode 100755
index 0000000..c52b4a1
--- /dev/null
+++ b/debian/patches/219-magic-update-wav.dpatch
@@ -0,0 +1,25 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 219-magic-update-wav.dpatch
+##
+## DP: Update wav magic.
+
[EMAIL PROTECTED]@
+
+diff -Naurp file.orig/magic/Magdir/riff file/magic/Magdir/riff
+--- file.orig/magic/Magdir/riff	2008-12-05 17:28:11.000000000 -0500
++++ file/magic/Magdir/riff	2008-12-05 17:33:48.000000000 -0500
+@@ -39,12 +39,14 @@
+ >>20	leshort		2		\b, Microsoft ADPCM
+ >>20	leshort		6		\b, ITU G.711 A-law
+ >>20	leshort		7		\b, ITU G.711 mu-law
++>>20	leshort		8		\b, Microsoft DTS
+ >>20	leshort		17		\b, IMA ADPCM
+ >>20	leshort		20		\b, ITU G.723 ADPCM (Yamaha)
+ >>20	leshort		49		\b, GSM 6.10
+ >>20	leshort		64		\b, ITU G.721 ADPCM
+ >>20	leshort		80		\b, MPEG
+ >>20	leshort		85		\b, MPEG Layer 3
++>>20	leshort		0x2001		\b, DTS
+ >>22	leshort		=1		\b, mono
+ >>22	leshort		=2		\b, stereo
+ >>22	leshort		>2		\b, %d channels
-- 
1.5.6.3

Reply via email to