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

rathann subversion at mplayerhq.hu
Sun Nov 10 12:38:58 CET 2013


Author: rathann
Date: Sun Nov 10 12:38:58 2013
New Revision: 1275

Log:
Reset vm->hop_channel while resetting everything else in vm_reset 

Calling vm_reset (via dvdnav_reset) does not currently reset the
hop_channel field.  This leads to "Error reading NAV packet." errors on
some DVDs because dvdnav_get_next_cache_block tries to prepare a
HOP_CHANNEL event and read from a file which hasn't yet been opened.

The attached patch resets the hop_channel field to zero.

Patch submitted by Richard (peper03 AT yahoo DOT com). Thanks!

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

Modified: trunk/libdvdnav/src/vm/vm.c
==============================================================================
--- trunk/libdvdnav/src/vm/vm.c	Mon Oct  7 00:35:16 2013	(r1274)
+++ trunk/libdvdnav/src/vm/vm.c	Sun Nov 10 12:38:58 2013	(r1275)
@@ -349,6 +349,8 @@ int vm_reset(vm_t *vm, const char *dvdro
 
   (vm->state).vtsN               = -1;
 
+  vm->hop_channel                = 0;
+
   if (vm->dvd && dvdroot) {
     /* a new dvd device has been requested */
     vm_stop(vm);


More information about the DVDnav-discuss mailing list