summaryrefslogtreecommitdiffstats
path: root/Lib/aifc.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-04-29 13:17:37 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-04-29 13:17:37 (GMT)
commit25b4add5b0569e626afd8b3b5b7dd4a7551372c9 (patch)
tree8525c0106c36179c66c803754434b9baf001896c /Lib/aifc.py
parenta1b91d944beda4a9f1a9ae9a34adbe59c2ad78f5 (diff)
downloadcpython-25b4add5b0569e626afd8b3b5b7dd4a7551372c9.zip
cpython-25b4add5b0569e626afd8b3b5b7dd4a7551372c9.tar.gz
cpython-25b4add5b0569e626afd8b3b5b7dd4a7551372c9.tar.bz2
Fix issue 2245. aifc now skips any chunk type it doesn't actually
process instead of throwing errors for anything not in an explicit skip list. This is per this spec: http://www.cnpbagwell.com/aiff-c.txt. Spec reference and test sound file provided by Santiago Peresón, fix based on patch by Hiroaki Kawai.
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r--Lib/aifc.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py
index f663dd6..8e4f864 100644
--- a/Lib/aifc.py
+++ b/Lib/aifc.py
@@ -144,9 +144,6 @@ class Error(Exception):
_AIFC_version = 0xA2805140L # Version 1 of AIFF-C
-_skiplist = 'COMT', 'INST', 'MIDI', 'AESD', \
- 'APPL', 'NAME', 'AUTH', '(c) ', 'ANNO'
-
def _read_long(file):
try:
return struct.unpack('>l', file.read(4))[0]
@@ -314,10 +311,6 @@ class Aifc_read:
self._version = _read_ulong(chunk)
elif chunkname == 'MARK':
self._readmark(chunk)
- elif chunkname in _skiplist:
- pass
- else:
- raise Error, 'unrecognized chunk type '+chunk.chunkname
chunk.skip()
if not self._comm_chunk_read or not self._ssnd_chunk:
raise Error, 'COMM chunk and/or SSND chunk missing'