summaryrefslogtreecommitdiffstats
path: root/contrib/libdvdnav
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-10-12 00:54:49 +0000
committerjstebbins <[email protected]>2009-10-12 00:54:49 +0000
commit8bedac1a474c71bf4e347f1fd292a422b409ab58 (patch)
treedcb9d52b4895ce481db0bae3e142305e04fd18b2 /contrib/libdvdnav
parent25d0ca7502aeb028781294edfa86b90d6bf1c608 (diff)
dvdnav: fix crash when poorly masterd disc has no menus
Mac The Ripper, when in "Main Feature Extraction" mode, likes to create an image with no menus, but leaves navigation commands in place that jump to the non-existing menu. libdvdnav doesn't like this much. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2877 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/libdvdnav')
-rw-r--r--contrib/libdvdnav/A06-null-pgcit.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/libdvdnav/A06-null-pgcit.patch b/contrib/libdvdnav/A06-null-pgcit.patch
new file mode 100644
index 000000000..8456b6400
--- /dev/null
+++ b/contrib/libdvdnav/A06-null-pgcit.patch
@@ -0,0 +1,17 @@
+diff -Naur libdvdnav.orig/src/vm/vm.c libdvdnav/src/vm/vm.c
+--- libdvdnav.orig/src/vm/vm.c 2009-03-13 18:28:22.000000000 -0700
++++ libdvdnav/src/vm/vm.c 2009-10-11 17:49:17.813221643 -0700
+@@ -1866,6 +1866,13 @@
+ default:
+ abort();
+ }
++ // get_MENU_PGCIT fails if h->pgci_ut == NULL.
++ // this happens with badly mastered discs. Mac The Ripper happens
++ // to create such discs when in "Main Feature Extraction" mode.
++ if(pgcit == NULL && vm->vtsi != NULL) {
++ (vm->state).domain = VTS_DOMAIN;
++ pgcit = vm->vtsi->vts_pgcit;
++ }
+
+ return pgcit;
+ }