Accept .wav with header metadata larger than filesize

pull/357/head
nyanpasu64 2019-01-03 00:36:08 -08:00
rodzic 89f534c4d6
commit b45d01e8df
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -274,7 +274,9 @@ def read(filename, mmap=False):
chunk_id = fid.read(4)
if not chunk_id:
raise ValueError("Unexpected end of file.")
warnings.warn("Wave ends before header's indicated file size",
WavFileWarning)
break
elif len(chunk_id) < 4:
raise ValueError("Incomplete wav chunk.")