Handle dumping CD-i discs with audio tracks and a hidden data track 1. Fixes #703

This commit is contained in:
2022-04-18 15:37:36 +01:00
parent 90d0d6f6c9
commit 333d1e4310
3 changed files with 23 additions and 12 deletions

View File

@@ -670,9 +670,11 @@ public static class MMC
Array.Copy(cmdBuf, 0, videoNowColorFrame, i * 2352, 2352);
}
FullTOC.TrackDataDescriptor? firstTrack = decodedToc?.TrackDescriptors.FirstOrDefault(t => t.POINT == 1);
FullTOC.TrackDataDescriptor? firstTrack =
decodedToc?.TrackDescriptors.FirstOrDefault(t => t.POINT ==
decodedToc.Value.TrackDescriptors.Min(m => m.POINT));
if(firstTrack?.POINT == 1)
if(firstTrack?.POINT is >= 1 and < 0xA0)
{
var firstTrackSector = (uint)(firstTrack.Value.PHOUR * 3600 * 75 + firstTrack.Value.PMIN * 60 * 75 +
firstTrack.Value.PSEC * 75 + firstTrack.Value.PFRAME - 150);