[Patches] [ python-Patches-1373643 ] chunk.py can't handle >2GB chunks
SourceForge.net
noreply at sourceforge.net
Sat Feb 18 22:11:15 CET 2006
Patches item #1373643, was opened at 2005-12-05 17:42
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1373643&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Christer Weinigel (wingel)
Assigned to: Nobody/Anonymous (nobody)
Summary: chunk.py can't handle >2GB chunks
Initial Comment:
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
----------------------------------------------------------------------
>Comment By: Georg Brandl (birkenfeld)
Date: 2006-02-18 22:11
Message:
Logged In: YES
user_id=1188172
Thanks for the report. Committed revisions 42464, 42465 (2.4).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1373643&group_id=5470
More information about the Patches
mailing list