On Wed, Nov 30, 2011 at 10:22 AM, Erik Hovland <[email protected]> wrote: >> I get the following assertion playing the "Tangled" DVD with mplayer >> and an up to date libdvdnav, on windows: >> >> Assertion failed: (vm->state).pgc->cell_playback[(vm->state).cellN - >> 1].block_mode != 0, file libdvdnav/vm/vm.c, line 1141 >> >> The weird part about this is that in mac/linux, I get this error >> message, and no failed assertion, and playing continues: >> libdvdnav: Invalid angle block >> >> I'd be happy to send more information, or a (legal) DVD to keep, for >> any developer that would like to tackle it. > > See that STRICT cpp macro in vm.c? It is probably accidentally > set on Windows because of a namespace clash. If that is the > case, that is the first bug to fix.
Does the attached patch at least make it so that mplayer behaves the same on all platforms? Thanks E -- Erik Hovland [email protected] http://hovland.org/
From 2b918d3b68ce0a854d60965f186a0ed829ee913d Mon Sep 17 00:00:00 2001 From: Erik Hovland <[email protected]> Date: Wed, 30 Nov 2011 10:25:32 -0800 Subject: [PATCH] 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. --- src/vm/vm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm/vm.c b/src/vm/vm.c index fb09a86..389091a 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -59,7 +59,7 @@ #endif /* -#define STRICT +#define DVDNAV_STRICT */ /* Local prototypes */ @@ -1136,7 +1136,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); -- 1.7.5.4
_______________________________________________ DVDnav-discuss mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
