From e09d5ae5df2928ad95a0e8c0ef35ea5db7af6472 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 16 Feb 2018 19:32:41 +0400 Subject: [PATCH] (Ail): detect audio and video files. --- ArcFormats/Ail/ArcAil.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ArcFormats/Ail/ArcAil.cs b/ArcFormats/Ail/ArcAil.cs index 35eee078..fdedc1b3 100644 --- a/ArcFormats/Ail/ArcAil.cs +++ b/ArcFormats/Ail/ArcAil.cs @@ -116,7 +116,7 @@ namespace GameRes.Formats.Ail entry.IsPacked = true; 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; } @@ -142,9 +142,17 @@ namespace GameRes.Formats.Ail static void SetEntryType (Entry entry, uint signature) { - var res = AutoEntry.DetectFileType (signature); - if (null != res) - entry.ChangeType (res); + if (0xBA010000 == signature) + { + entry.Type = "video"; + entry.Name = Path.ChangeExtension (entry.Name, "mpg"); + } + else + { + var res = AutoEntry.DetectFileType (signature); + if (null != res) + entry.ChangeType (res); + } } ///