[DVDnav-discuss] r1197 - trunk/libdvdnav/src/vm/vm.c

nicodvb subversion at mplayerhq.hu
Tue Jun 1 12:01:33 CEST 2010


Author: nicodvb
Date: Tue Jun  1 12:01:33 2010
New Revision: 1197

Log:
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

Modified:
   trunk/libdvdnav/src/vm/vm.c

Modified: trunk/libdvdnav/src/vm/vm.c
==============================================================================
--- trunk/libdvdnav/src/vm/vm.c	Tue Jun  1 10:17:15 2010	(r1196)
+++ trunk/libdvdnav/src/vm/vm.c	Tue Jun  1 12:01:33 2010	(r1197)
@@ -358,8 +358,6 @@ int vm_reset(vm_t *vm, const char *dvdro
       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 @@ int vm_reset(vm_t *vm, const char *dvdro
       /* 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;


More information about the DVDnav-discuss mailing list