OSDN Git Service

dvdnav: fix crash when poorly masterd disc has no menus
[handbrake-jp/handbrake-jp-git.git] / contrib / libdvdnav / A06-null-pgcit.patch
1 diff -Naur libdvdnav.orig/src/vm/vm.c libdvdnav/src/vm/vm.c
2 --- libdvdnav.orig/src/vm/vm.c  2009-03-13 18:28:22.000000000 -0700
3 +++ libdvdnav/src/vm/vm.c       2009-10-11 17:49:17.813221643 -0700
4 @@ -1866,6 +1866,13 @@
5    default:
6      abort();
7    }
8 +  // get_MENU_PGCIT fails if h->pgci_ut == NULL.
9 +  // this happens with badly mastered discs.  Mac The Ripper happens
10 +  // to create such discs when in "Main Feature Extraction" mode.
11 +  if(pgcit == NULL && vm->vtsi != NULL) {
12 +    (vm->state).domain = VTS_DOMAIN;
13 +    pgcit = vm->vtsi->vts_pgcit;
14 +  }
15  
16    return pgcit;
17  }