mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Write extra field in Alcohol for tracks that don't have it (POINT>=A0h).
This commit is contained in:
@@ -854,19 +854,20 @@ namespace Aaru.DiscImages
|
||||
long position = descriptorStream.Position;
|
||||
descriptorStream.Seek(track.extraOffset, SeekOrigin.Begin);
|
||||
|
||||
block = new byte[Marshal.SizeOf<AlcoholTrackExtra>()];
|
||||
|
||||
if(alcTrackExtras.TryGetValue(track.point, out AlcoholTrackExtra extra))
|
||||
{
|
||||
block = new byte[Marshal.SizeOf<AlcoholTrackExtra>()];
|
||||
|
||||
blockPtr =
|
||||
System.Runtime.InteropServices.Marshal.AllocHGlobal(Marshal.SizeOf<AlcoholTrackExtra>());
|
||||
|
||||
System.Runtime.InteropServices.Marshal.StructureToPtr(extra, blockPtr, true);
|
||||
System.Runtime.InteropServices.Marshal.Copy(blockPtr, block, 0, block.Length);
|
||||
System.Runtime.InteropServices.Marshal.FreeHGlobal(blockPtr);
|
||||
descriptorStream.Write(block, 0, block.Length);
|
||||
}
|
||||
|
||||
descriptorStream.Write(block, 0, block.Length);
|
||||
|
||||
descriptorStream.Seek(position, SeekOrigin.Begin);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user