(Ail): detect audio and video files.

This commit is contained in:
morkt 2018-02-16 19:32:41 +04:00
parent 787cc68192
commit e09d5ae5df

View File

@ -116,7 +116,7 @@ namespace GameRes.Formats.Ail
entry.IsPacked = true; entry.IsPacked = true;
entry.UnpackedSize = file.View.ReadUInt32 (entry.Offset+2); entry.UnpackedSize = file.View.ReadUInt32 (entry.Offset+2);
} }
else if (0 == signature) else if (0 == signature || file.View.AsciiEqual (entry.Offset+4, "OggS"))
{ {
extra = 4; extra = 4;
} }
@ -142,9 +142,17 @@ namespace GameRes.Formats.Ail
static void SetEntryType (Entry entry, uint signature) static void SetEntryType (Entry entry, uint signature)
{ {
var res = AutoEntry.DetectFileType (signature); if (0xBA010000 == signature)
if (null != res) {
entry.ChangeType (res); entry.Type = "video";
entry.Name = Path.ChangeExtension (entry.Name, "mpg");
}
else
{
var res = AutoEntry.DetectFileType (signature);
if (null != res)
entry.ChangeType (res);
}
} }
/// <summary> /// <summary>