diff 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
line wrap: on
line diff
--- a/vm/vm.c	Tue Jun 01 08:17:15 2010 +0000
+++ b/vm/vm.c	Tue Jun 01 10:01:33 2010 +0000
@@ -358,8 +358,6 @@
       fprintf(MSG_OUT, "libdvdnav: vm: failed to open/read the DVD\n");
       return 0;
     }
-    dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot);
-    vm->map  = remap_loadmap(vm->dvd_name);
     vm->vmgi = ifoOpenVMGI(vm->dvd);
     if(!vm->vmgi) {
       fprintf(MSG_OUT, "libdvdnav: vm: failed to read VIDEO_TS.IFO\n");
@@ -390,6 +388,8 @@
       /* return 0; Not really used for now.. */
     }
     /* ifoRead_TXTDT_MGI(vmgi); Not implemented yet */
+    dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot);
+    vm->map  = remap_loadmap(vm->dvd_name);
   }
   if (vm->vmgi) {
     int i, mask;