changeset 252:aee8af592d66 src

fix a long-standing problem: sometimes, hitting Escape in the movie and then again in the menu does not resume the movie, but throws "Expected NAV packet, but none found." at you; reason: link_values.data1, which we use to transport the block number for the resume is 16bit, but blockN is 32bit and can actually use more than 16bit sometimes; solution: use link_values.data2 for the upper 16bit (I did not want to change the declaration of link_t, because it seems closer to the DVD standard to have 16bit wide entries there, actually we are abusing the link_values for the resume block number anyway.)
author mroi
date Thu, 30 Sep 2004 19:16:36 +0000
parents 1c8dc80922d3
children acd4225262fc
files vm/vm.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vm/vm.c	Mon Sep 27 12:24:01 2004 +0000
+++ b/vm/vm.c	Thu Sep 30 19:16:36 2004 +0000
@@ -1343,10 +1343,11 @@
 	  (vm->state).pgN = 1;
 	  link_values = play_PG(vm);
 	} else { 
-	  /* (vm->state).pgN = ?? this gets the righ value in set_PGN() below */
+	  /* (vm->state).pgN = ?? this gets the right value in set_PGN() below */
 	  (vm->state).cellN = (vm->state).rsm_cellN;
 	  link_values.command = PlayThis;
-	  link_values.data1 = (vm->state).rsm_blockN;
+	  link_values.data1 = (vm->state).rsm_blockN & 0xffff;
+	  link_values.data2 = (vm->state).rsm_blockN >> 16;
 	  if(!set_PGN(vm)) {
 	    /* Were at the end of the PGC, should not happen for a RSM */
 	    assert(0);
@@ -1549,7 +1550,7 @@
 #endif
     
   }
-  (vm->state).blockN = link_values.data1;
+  (vm->state).blockN = link_values.data1 | (link_values.data2 << 16);
   return 1;
 }