mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(WAV): check for invalid encoding tag.
This commit is contained in:
parent
5e53eb5fa1
commit
d8062b0240
@ -113,9 +113,11 @@ namespace GameRes
|
|||||||
|
|
||||||
public override SoundInput TryOpen (IBinaryStream file)
|
public override SoundInput TryOpen (IBinaryStream file)
|
||||||
{
|
{
|
||||||
var header = file.ReadHeader (12);
|
var header = file.ReadHeader (0x16);
|
||||||
if (!header.AsciiEqual (8, "WAVE"))
|
if (!header.AsciiEqual (8, "WAVE"))
|
||||||
return null;
|
return null;
|
||||||
|
if (header.ToUInt16 (0x14) == 0xFFFF)
|
||||||
|
return null;
|
||||||
file.Position = 0;
|
file.Position = 0;
|
||||||
SoundInput sound = new WaveInput (file.AsStream);
|
SoundInput sound = new WaveInput (file.AsStream);
|
||||||
if (EmbeddedFormats.Contains (sound.Format.FormatTag))
|
if (EmbeddedFormats.Contains (sound.Format.FormatTag))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user