summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvan <[email protected]>2009-06-08 05:24:18 +0000
committervan <[email protected]>2009-06-08 05:24:18 +0000
commit46db4a42c5f2ac3cf311295130141ed8e05bd1a2 (patch)
tree35b0bf92fc20e82f38cddac7f446576617878140
parenta5631d9f95e9c70d8eda4a83acfc93394a8484be (diff)
Some DVD titles end with a 'link' command back to the beginning chapter which makes HB encode forever. If we move to an earlier chapter say we're done.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2499 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/dvdnav.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c
index 2236f6d10..4c6fd9a39 100644
--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -1080,8 +1080,16 @@ static int hb_dvdnav_read( hb_dvd_t * e, hb_buffer_t * b )
return 0;
}
c = FindChapterIndex(d->list_chapter, pgcn, pgn);
- if (c > d->chapter)
+ if (c != d->chapter)
+ {
+ if (c < d->chapter)
+ {
+ // Some titles end with a 'link' back to the beginning so
+ // a transition to an earlier chapter means we're done.
+ return 0;
+ }
chapter = d->chapter = c;
+ }
}
break;