summaryrefslogtreecommitdiffstats
path: root/Lib/wave.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-10-09 20:01:53 (GMT)
committerGuido van Rossum <guido@python.org>2000-10-09 20:01:53 (GMT)
commiteca576c68be8299b006251eeea0f23068520ed57 (patch)
tree2f0833028cbc03ff6223d7a910d10aebda2f13b0 /Lib/wave.py
parentebe73025cde08703861322a6ae38095dbe494512 (diff)
downloadcpython-eca576c68be8299b006251eeea0f23068520ed57.zip
cpython-eca576c68be8299b006251eeea0f23068520ed57.tar.gz
cpython-eca576c68be8299b006251eeea0f23068520ed57.tar.bz2
Fix by Jean-Claude Rimbault [ Bug #116271 ] -- the WAVE header was
never written properly because the '4' length indicators for the 's' format characters were missing.
Diffstat (limited to 'Lib/wave.py')
-rw-r--r--Lib/wave.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/wave.py b/Lib/wave.py
index c8cf997..49e070f 100644
--- a/Lib/wave.py
+++ b/Lib/wave.py
@@ -439,7 +439,7 @@ class Wave_write:
self._nframes = initlength / (self._nchannels * self._sampwidth)
self._datalength = self._nframes * self._nchannels * self._sampwidth
self._form_length_pos = self._file.tell()
- self._file.write(struct.pack('<lsslhhllhhs',
+ self._file.write(struct.pack('<l4s4slhhllhh4s',
36 + self._datalength, 'WAVE', 'fmt ', 16,
WAVE_FORMAT_PCM, self._nchannels, self._framerate,
self._nchannels * self._framerate * self._sampwidth,