Update riff_parser.py

Added `BW64` identifier, which is apparently what certain ITU/EBU big WAV files use.
This commit is contained in:
Jamie Hardt
2020-08-07 22:52:28 -07:00
committed by GitHub
parent 18ebd22ec1
commit 8fe799b211

View File

@@ -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()