homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: chunk.py can't handle>2GB chunks
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, wingel
Priority: normal Keywords: patch

Created on 2005年12月05日 16:42 by wingel, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
chunk.diff wingel, 2005年12月05日 16:42 Patch to chunk.py
Messages (2)
msg49167 - (view) Author: Christer Weinigel (wingel) Date: 2005年12月05日 16:42
chunk.py unpacks the chunk size as a signed long 'l'
not as unsigned long 'L' which is what it ought to do
according to the WAV specs. Additionally, since field
contains a byte count it makes no sense for it to be
signed.
What I want to do is to read a wave file generated by
madplay on the fly. Since madplay doesn't know the
size of the WAVE chunk when it is written, it sets the
chunk size to 0xffff which is inpreted as -1 by
chunk.py . Changing chunk.py to read it as an unsigned
long makes this work.
Example code:
import wave
import os
f = os.popen('madplay -o wave:- foo.mp3')
wf = wave.open(f, 'rb')
Without a patch, this will raise an error:
wave.Error: not a WAVE file
msg49168 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006年02月18日 21:11
Logged In: YES 
user_id=1188172
Thanks for the report. Committed revisions 42464, 42465 (2.4).
History
Date User Action Args
2022年04月11日 14:56:14adminsetgithub: 42661
2005年12月05日 16:42:45wingelcreate

AltStyle によって変換されたページ (->オリジナル) /