Fix infinite loop when Lead-Out cannot be crossed.

This commit is contained in:
2020-07-14 14:24:44 +01:00
parent dca471be1e
commit 533a94bdc9

View File

@@ -394,9 +394,17 @@ namespace Aaru.Core.Devices.Dumping
_outputPlugin.WriteSectorsLong(data, i + r, 1);
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
desiredSubchannel, sub, i + r, 1, subLog, isrcs, (byte)track.TrackSequence,
ref mcn, tracks, subchannelExtents, _fixSubchannelPosition, _outputPlugin,
_fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus);
desiredSubchannel, sub,
i + r, 1, subLog, isrcs,
(byte)track.
TrackSequence,
ref mcn, tracks,
subchannelExtents,
_fixSubchannelPosition,
_outputPlugin,
_fixSubchannel,
_fixSubchannelCrc,
_dumpLog, UpdateStatus);
// Set tracks and go back
if(indexesChanged)
@@ -527,9 +535,15 @@ namespace Aaru.Core.Devices.Dumping
_outputPlugin.WriteSectorsLong(data, i, blocksToRead);
bool indexesChanged = Media.CompactDisc.WriteSubchannelToImage(supportedSubchannel,
desiredSubchannel, sub, i, blocksToRead, subLog, isrcs, (byte)track.TrackSequence,
ref mcn, tracks, subchannelExtents, _fixSubchannelPosition, _outputPlugin,
_fixSubchannel, _fixSubchannelCrc, _dumpLog, UpdateStatus);
desiredSubchannel, sub, i,
blocksToRead, subLog, isrcs,
(byte)track.TrackSequence,
ref mcn, tracks,
subchannelExtents,
_fixSubchannelPosition,
_outputPlugin, _fixSubchannel,
_fixSubchannelCrc, _dumpLog,
UpdateStatus);
// Set tracks and go back
if(indexesChanged)
@@ -570,6 +584,9 @@ namespace Aaru.Core.Devices.Dumping
{
if(crossingLeadOut && Sense.DecodeFixed(senseBuf)?.ASC == 0x21)
{
if(failedCrossingLeadOut)
break;
failedCrossingLeadOut = true;
blocksToRead = 0;