I see what Jean means about libdvdnav asserting all the dang time.

What do these two patches do? It may actually be the right thing to do
in this instance, so I am curious what the error messaging patch says
without using the return instead of assert patch.

Thanks

E


On Tue, Mar 18, 2014 at 3:14 AM, Jan Janssen <[email protected]> wrote:
> Roger Pack <rogerdpack2@...> writes:
>
>>
>> On 3/14/14, Jan Janssen <medhefgo@...> wrote:
>> > Hi,
>> >
>> > I got this DVD that makes vlc+libdvdnav crash (both latest git builds).
>> > I think it is libdvdnav, but I am not completely sure, because I can still
>> > access the DVD menu with "mplayer dvdnav://". This is the trace I get:
>> >
>> > #0  0x00007ffff742b389 in __GI_raise (sig=sig <at> entry=6) at
>> > ../nptl/sysdeps/unix/sysv/linux/raise.c:56
>> > #1  0x00007ffff742c788 in __GI_abort () at abort.c:89
>> > #2  0x00007ffff74244a6 in __assert_fail_base (fmt=0x7ffff755a1a0 
>> > "%s%s%s:%u:
>> > %s%sAssertion `%s' failed.\n%n", assertion=assertion <at>
> entry=0x7ffff3087d04
>> > "0",
>> >     file=file <at> entry=0x7ffff308884c "src/vm/vm.c", line=line <at>
> entry=850,
>>
>> Looks like dvdnav to me [patch welcome?]
>>
>
>
> If you're asking whether I would be willing to test patches that should fix
> this: yes. Unfortunately, I don't have the expertise to fix this myself, or
> I'd have sent in a patch myself.
>
> _______________________________________________
> DVDnav-discuss mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss



-- 
Erik Hovland
[email protected]
http://hovland.org/
diff --git a/src/vm/getset.c b/src/vm/getset.c
index bbcbe21..8e45fcd 100644
--- a/src/vm/getset.c
+++ b/src/vm/getset.c
@@ -148,8 +148,10 @@ int set_PGCN(vm_t *vm, int pgcN) {
   pgcit_t *pgcit = NULL;
 
   pgcit = get_PGCIT(vm);
-  if (pgcit == NULL)
+  if (pgcit == NULL) {
+    fprintf(MSG_OUT, "libdvdnav: Failed to retrieve PGCIT\n");
     return 0;
+  }
 
   if(pgcN < 1 || pgcN > pgcit->nr_of_pgci_srp) {
 #ifdef TRACE
@@ -330,11 +332,17 @@ pgcit_t* get_PGCIT(vm_t *vm) {
 
   switch ((vm->state).domain) {
   case DVD_DOMAIN_VTSTitle:
-    if(!vm->vtsi) return NULL;
+    if(!vm->vtsi) {
+      fprintf(MSG_OUT, "libdvdnav: DVD_DOMAIN_VTSTitle vm->vtsi is NULL\n");
+      return NULL;
+    }
     pgcit = vm->vtsi->vts_pgcit;
     break;
   case DVD_DOMAIN_VTSMenu:
-    if(!vm->vtsi) return NULL;
+    if(!vm->vtsi) {
+      fprintf(MSG_OUT, "libdvdnav: DVD_DOMAIN_VTSMenu vm->vtsi is NULL\n");
+      return NULL;
+    }
     pgcit = get_MENU_PGCIT(vm, vm->vtsi, (vm->state).registers.SPRM[0]);
     break;
   case DVD_DOMAIN_VMGM:
diff --git a/src/vm/vm.c b/src/vm/vm.c
index d956a38..696499e 100644
--- a/src/vm/vm.c
+++ b/src/vm/vm.c
@@ -847,7 +847,7 @@ static int process_command(vm_t *vm, link_t link_values) {
     case LinkPGCN:
       /* Link to Program Chain Number:data1 */
       if(!set_PGCN(vm, link_values.data1))
-        assert(0);
+        return 0;
       link_values = play_PGC(vm);
       break;
 
_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss

Reply via email to