diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 1993-01-26 09:24:37 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 1993-01-26 09:24:37 (GMT) |
commit | 93f07400737a430ce642b4e7f6c9bd3e4460229c (patch) | |
tree | c5a215a5e63cf930ec759007d559c829a8d4e61b /Lib/aifc.py | |
parent | 3ad7fc70cc17465b5e7556bdfd83882da0da2c23 (diff) | |
download | cpython-93f07400737a430ce642b4e7f6c9bd3e4460229c.zip cpython-93f07400737a430ce642b4e7f6c9bd3e4460229c.tar.gz cpython-93f07400737a430ce642b4e7f6c9bd3e4460229c.tar.bz2 |
Fixed a bug where the library inadvertently skipped over the sound
data.
Pass an extra parameter to the compression library.
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r-- | Lib/aifc.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py index 8e7aa2b..0849bd7 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -398,7 +398,8 @@ class Aifc_read(): pass else: raise Error, 'unrecognized chunk type '+chunk.chunkname - chunk.skip() + if formlength > 0: + chunk.skip() if not self._comm_chunk_read or not self._ssnd_chunk: raise Error, 'COMM chunk and/or SSND chunk missing' if self._aifc and self._decomp: @@ -500,7 +501,8 @@ class Aifc_read(): size = size / 2 data = self._ssnd_chunk.read(size) if self._decomp and data: - params = [CL.FRAME_BUFFER_SIZE, len(data) * 2] + params = [CL.FRAME_BUFFER_SIZE, len(data) * 2, \ + CL.COMPRESSED_BUFFER_SIZE, len(data)] self._decomp.SetParams(params) data = self._decomp.Decompress(len(data) / self._nchannels, data) self._soundpos = self._soundpos + len(data) / (self._nchannels * self._sampwidth) |