comparison vm/vm.c @ 404:d16ee5945580 src

Prevent display of garbage volume label when the file being scanned is not a dvd. This is a simple movement of the code that logs the volume name to after the point that some basic validation of the disc has been performed. Patch by John Stebbins of Handbrake
author nicodvb
date Tue, 01 Jun 2010 10:01:33 +0000
parents 1ce807c12563
children 7923e813ec61
comparison
equal deleted inserted replaced
403:1ce807c12563 404:d16ee5945580
356 vm->dvd = DVDOpen(dvdroot); 356 vm->dvd = DVDOpen(dvdroot);
357 if(!vm->dvd) { 357 if(!vm->dvd) {
358 fprintf(MSG_OUT, "libdvdnav: vm: failed to open/read the DVD\n"); 358 fprintf(MSG_OUT, "libdvdnav: vm: failed to open/read the DVD\n");
359 return 0; 359 return 0;
360 } 360 }
361 dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot);
362 vm->map = remap_loadmap(vm->dvd_name);
363 vm->vmgi = ifoOpenVMGI(vm->dvd); 361 vm->vmgi = ifoOpenVMGI(vm->dvd);
364 if(!vm->vmgi) { 362 if(!vm->vmgi) {
365 fprintf(MSG_OUT, "libdvdnav: vm: failed to read VIDEO_TS.IFO\n"); 363 fprintf(MSG_OUT, "libdvdnav: vm: failed to read VIDEO_TS.IFO\n");
366 return 0; 364 return 0;
367 } 365 }
388 if(!ifoRead_VOBU_ADMAP(vm->vmgi)) { 386 if(!ifoRead_VOBU_ADMAP(vm->vmgi)) {
389 fprintf(MSG_OUT, "libdvdnav: vm: ifoRead_VOBU_ADMAP vgmi failed\n"); 387 fprintf(MSG_OUT, "libdvdnav: vm: ifoRead_VOBU_ADMAP vgmi failed\n");
390 /* return 0; Not really used for now.. */ 388 /* return 0; Not really used for now.. */
391 } 389 }
392 /* ifoRead_TXTDT_MGI(vmgi); Not implemented yet */ 390 /* ifoRead_TXTDT_MGI(vmgi); Not implemented yet */
391 dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot);
392 vm->map = remap_loadmap(vm->dvd_name);
393 } 393 }
394 if (vm->vmgi) { 394 if (vm->vmgi) {
395 int i, mask; 395 int i, mask;
396 fprintf(MSG_OUT, "libdvdnav: DVD disk reports itself with Region mask 0x%08x. Regions:", 396 fprintf(MSG_OUT, "libdvdnav: DVD disk reports itself with Region mask 0x%08x. Regions:",
397 vm->vmgi->vmgi_mat->vmg_category); 397 vm->vmgi->vmgi_mat->vmg_category);