mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-07-08 18:16:24 +00:00
[ISO9660] Handle BD long sectors
This commit is contained in:
@@ -77,4 +77,14 @@ public sealed class Sector
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static byte[] GetUserData(byte[] data)
|
||||
{
|
||||
if(data.Length != 2052) return data;
|
||||
|
||||
byte[] sector = new byte[2048];
|
||||
Array.Copy(data, 0, sector, 0, 2048);
|
||||
|
||||
return sector;
|
||||
}
|
||||
}
|
||||
@@ -234,9 +234,14 @@ public sealed partial class ISO9660
|
||||
}
|
||||
}
|
||||
|
||||
byte[] sectorData = data.Length == 2064
|
||||
? Decoders.DVD.Sector.GetUserData(data)
|
||||
: Sector.GetUserData(data, interleaved, fileNumber);
|
||||
byte[] sectorData;
|
||||
|
||||
if(data.Length == 2064) // DVD sector
|
||||
sectorData = Decoders.DVD.Sector.GetUserData(data);
|
||||
else if(data.Length == 2052) // Blu-ray sector
|
||||
sectorData = Decoders.Bluray.Sector.GetUserData(data);
|
||||
else // CD sector
|
||||
sectorData = Sector.GetUserData(data, interleaved, fileNumber);
|
||||
|
||||
ms.Write(sectorData, 0, sectorData.Length);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user