tag/Aiff: the FORM chunk size is big-endian
Was broken by commit 8a86460b8f
Closes #87
This commit is contained in:
parent
cf0c59864f
commit
dd9fd3d8a7
2
NEWS
2
NEWS
|
@ -1,6 +1,8 @@
|
||||||
ver 0.20.10 (not yet released)
|
ver 0.20.10 (not yet released)
|
||||||
* decoder
|
* decoder
|
||||||
- ffmpeg: support MusicBrainz ID3v2 tags
|
- ffmpeg: support MusicBrainz ID3v2 tags
|
||||||
|
* tags
|
||||||
|
- aiff: fix FORM chunk size endianess (is big-endian)
|
||||||
|
|
||||||
ver 0.20.9 (2017/06/04)
|
ver 0.20.9 (2017/06/04)
|
||||||
* decoder
|
* decoder
|
||||||
|
|
|
@ -49,7 +49,7 @@ aiff_seek_id3(InputStream &is)
|
||||||
aiff_header header;
|
aiff_header header;
|
||||||
is.ReadFull(&header, sizeof(header));
|
is.ReadFull(&header, sizeof(header));
|
||||||
if (memcmp(header.id, "FORM", 4) != 0 ||
|
if (memcmp(header.id, "FORM", 4) != 0 ||
|
||||||
(is.KnownSize() && FromLE32(header.size) > is.GetSize()) ||
|
(is.KnownSize() && FromBE32(header.size) > is.GetSize()) ||
|
||||||
(memcmp(header.format, "AIFF", 4) != 0 &&
|
(memcmp(header.format, "AIFF", 4) != 0 &&
|
||||||
memcmp(header.format, "AIFC", 4) != 0))
|
memcmp(header.format, "AIFC", 4) != 0))
|
||||||
throw std::runtime_error("Not an AIFF file");
|
throw std::runtime_error("Not an AIFF file");
|
||||||
|
|
Loading…
Reference in New Issue