X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/blobdiff_plain/4d69e9430e4971eb923d87f31dcf5b089159a4fa..refs/heads/mdw/cleanup:/dvd-sector-copy.c diff --git a/dvd-sector-copy.c b/dvd-sector-copy.c index 019e382..8408f41 100644 --- a/dvd-sector-copy.c +++ b/dvd-sector-copy.c @@ -700,9 +700,6 @@ static double sectors_to_angle(secaddr base, secaddr low, secaddr high) #undef K } -#define LAYER_LIMIT 2298496 /* maximum (user) sectors on layer */ -#define DVDROM_OFFSET 0x30000 /* usual initial physical sector */ - enum { FLAT, /* not actually a real DVD */ SINGLE, /* disc with only one layer */ @@ -733,6 +730,9 @@ static void setup_geometry(struct geometry *g, int fd, unsigned f, #endif secaddr t; +#define LAYER_LIMIT 2298496 /* maximum (user) sectors on layer */ +#define DVDROM_OFFSET 0x30000 /* usual initial physical sector */ + if (!(f&GF_BLKDEV)) { /* We're reading from a regular file. Assume that progress will be * linear. @@ -804,6 +804,9 @@ guess_structure: t -= DVDROM_OFFSET; g->midpoint = t; } + +#undef LAYER_LIMIT +#undef DVDROM_OFFSET } static double linear_progress(const struct geometry *g,