From: Mark Wooding Date: Sat, 9 Apr 2022 16:46:11 +0000 (+0100) Subject: dvd-sector-copy.c (main): Sink progress setup to just before opening device. X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/commitdiff_plain/64229dd6766eb69d326df96ed356ed0782425ed1 dvd-sector-copy.c (main): Sink progress setup to just before opening device. --- diff --git a/dvd-sector-copy.c b/dvd-sector-copy.c index 9186d72..27ec397 100644 --- a/dvd-sector-copy.c +++ b/dvd-sector-copy.c @@ -1024,8 +1024,6 @@ int main(int argc, char *argv[]) if (argc - optind != 2) f |= f_bogus; if (f&f_bogus) { usage(stderr); exit(2); } - setlocale(LC_ALL, ""); - progress_init(&progress); device = argv[optind]; outfile = argv[optind + 1]; if (badblocks.n) { @@ -1039,6 +1037,8 @@ int main(int argc, char *argv[]) #endif } + setlocale(LC_ALL, ""); + progress_init(&progress); if (open_dvd(device, O_RDONLY, &dvdfd, &dvd)) exit(2); blksz = SECTORSZ; volsz = device_size(dvdfd, device, &blksz);