[DVDnav-discuss] [PATCH] Fix failed assertion when there's no menu (was Re: libdvdnav 4.1.4)

Erik Hovland erik at hovland.org
Mon Oct 10 23:54:13 CEST 2011


>> 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
erik at hovland.org
http://hovland.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Return-0-instead-of-an-assert.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20111010/d3546423/attachment.bin>


More information about the DVDnav-discuss mailing list