mirror of
https://github.com/iluvcapra/wavinfo.git
synced 2025-12-31 17:00:41 +00:00
Update riff_parser.py
Added `BW64` identifier, which is apparently what certain ITU/EBU big WAV files use.
This commit is contained in:
@@ -56,7 +56,7 @@ def parse_chunk(stream, rf64_context=None):
|
||||
data_size = struct.unpack('<I', size_bytes)[0]
|
||||
|
||||
if data_size == 0xFFFFFFFF:
|
||||
if rf64_context is None and ident == b'RF64':
|
||||
if rf64_context is None and ident in [b'RF64', b'BW64']:
|
||||
rf64_context = parse_rf64(stream=stream)
|
||||
|
||||
data_size = rf64_context.bigchunk_table[ident]
|
||||
@@ -65,7 +65,7 @@ def parse_chunk(stream, rf64_context=None):
|
||||
if (displacement % 2) != 0:
|
||||
displacement = displacement + 1
|
||||
|
||||
if ident in [b'RIFF', b'LIST', b'RF64']:
|
||||
if ident in [b'RIFF', b'LIST', b'RF64', b'BW64']:
|
||||
return parse_list_chunk(stream=stream, length=data_size, rf64_context=rf64_context)
|
||||
else:
|
||||
data_start = stream.tell()
|
||||
|
||||
Reference in New Issue
Block a user