Open jjr90 opened 1 month ago
The quick fix would be to determine the thresholds the same way you're determining the image size in the statements below (i.e. with the ?:
operator again, or perhaps factor that out..)
To clarify, this is a bug when the user correctly specifies --no-bdr-defect-management
.
This is not caused by a user error.
When the user correctly specifies
--no-bdr-defect-management
, in exhaustive scan mode (bypassing the "Easy shot: Locate the ecc header"), dvdisaster will determine the disc as the next size up (dual-layer instead of single-layer, etc).This is causing the exhaustive scan to fail unpredictably, in cases when it's needed:
In rs03-recognize.c:
As you can see, an SL image that's been augmented with no defect management will have an
image_sectors
GREATER THANBD_SL_SIZE
, and will thus match theimage_sectors < BD_DL_SIZE
instead.dvdisaster thus detects a single-layer disc as a dual-layer disc, etc. This causes the
layer_size
variable to be double what it should be, and the exhaustive scan MAY fail, depending on how the scan alignment works out.I can provide a test case to reproduce the unpredictability, but the wrong logic is easy to see there.
Disclaimer: I haven't looked at any of the RS01/02 code, don't know what might be applicable there.