[DVDnav-discuss] r1268 - trunk/libdvdnav/src/vm/vm.c
rathann
subversion at mplayerhq.hu
Sun Oct 6 22:54:43 CEST 2013
Author: rathann
Date: Sun Oct 6 22:54:43 2013
New Revision: 1268
Log:
Prevent general CPP macro from causing strange behavior.
Roger Pack reported that when playing the DVD "Tangled"
w/ mplayer and recent libdvdnav, mplayer crashes w/ the error message:
Assertion failed: (vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_mode != 0, file libdvdnav/vm/vm.c, line 1141
This line should only be triggered when a developer wants a "strict"
build of the library. Most likely using the very general term
STRICT to #ifdef this clause is what is causing this issue. This
patch adds a DVDNAV_ in front of the strict to prevent the
macro from being enabled accidentally.
Patch by Erik Hovland.
Modified:
trunk/libdvdnav/src/vm/vm.c
Modified: trunk/libdvdnav/src/vm/vm.c
==============================================================================
--- trunk/libdvdnav/src/vm/vm.c Sun Oct 6 22:47:20 2013 (r1267)
+++ trunk/libdvdnav/src/vm/vm.c Sun Oct 6 22:54:43 2013 (r1268)
@@ -59,7 +59,7 @@
#endif
/*
-#define STRICT
+#define DVDNAV_STRICT
*/
/* Local prototypes */
@@ -1128,7 +1128,7 @@ static link_t play_Cell(vm_t *vm) {
case 1: /* Angle block */
/* Loop and check each cell instead? So we don't get outside the block? */
(vm->state).cellN += (vm->state).AGL_REG - 1;
-#ifdef STRICT
+#ifdef DVDNAV_STRICT
assert((vm->state).cellN <= (vm->state).pgc->nr_of_cells);
assert((vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_mode != 0);
assert((vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_type == 1);
More information about the DVDnav-discuss
mailing list