From 46db4a42c5f2ac3cf311295130141ed8e05bd1a2 Mon Sep 17 00:00:00 2001 From: van Date: Mon, 8 Jun 2009 05:24:18 +0000 Subject: [PATCH] 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 --- libhb/dvdnav.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- 2.40.0