>> libdvdread: Found 1 VTS's >> libdvdread: Elapsed time 0 >> libdvdnav: Language 'en' not found, using '' instead >> libdvdnav: Menu Languages available: >> libdvdnav: Language 'en' not found, using '' instead >> libdvdnav: Menu Languages available: >> libdvdnav: Language 'en' not found, using '' instead >> libdvdnav: Menu Languages available: >> libdvdnav: *** pgci_ut handle is NULL *** >> totem: /builddir/build/BUILD/libdvdnav-4.1.4/src/vm/vm.c:1772: get_ID: >> Assertion `pgcit != ((void *)0)' failed. > > What is the title of this DVD? Could you provide an ISO image > for testing (privately, of course)? > > Does this still happen with current SVN sources? > > If yes, could you test the attached patch?
I am pretty sure that the return value has to be 0 and not -1. Sadly, libdvdnav (and vm.c especially) breaks the Unix convention of 0 being successful execution. Patch attached. It is almost guaranteed that removing this assert is only the tip of the iceberg, there are many places in the code that are written like: if (!set_PGCN(target, pgcN)) assert(0); But I am all for the removal of asserts in a library. E -- Erik Hovland [email protected] http://hovland.org/
From 18c0641b8193cbd799a1151d4c5f7b7511bcae92 Mon Sep 17 00:00:00 2001 From: Erik Hovland <[email protected]> Date: Mon, 10 Oct 2011 14:47:59 -0700 Subject: [PATCH] Return 0 instead of an assert --- src/vm/vm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/vm/vm.c b/src/vm/vm.c index a6b6dae..09f8fd7 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -1762,7 +1762,8 @@ static int set_PGCN(vm_t *vm, int pgcN) { pgcit_t *pgcit; pgcit = get_PGCIT(vm); - assert(pgcit != NULL); /* ?? Make this return -1 instead */ + if (pgcit != NULL) + return 0; if(pgcN < 1 || pgcN > pgcit->nr_of_pgci_srp) { #ifdef TRACE -- 1.7.4.1
_______________________________________________ DVDnav-discuss mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
