diff options
author | jstebbins <[email protected]> | 2011-06-05 19:48:05 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-06-05 19:48:05 +0000 |
commit | bad856916a1b7d00e6a118fed9f7941e4602c155 (patch) | |
tree | 0c2e3c8793b2424e34ffd773744d5871ffba5828 | |
parent | fbd5819470a271a348f35c06dfc82960ebb6a9e4 (diff) |
Fix a problem with filtering and picking correct BD title
Titles that are the same except for number of chapters were being
filtered out of the title list. So sometimes you would get a BD title
that didn't seem to have any chapters.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4024 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | contrib/libbluray/module.defs | 2 | ||||
-rw-r--r-- | libhb/bd.c | 13 | ||||
-rw-r--r-- | test/test.c | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/contrib/libbluray/module.defs b/contrib/libbluray/module.defs index b6db7c7de..123eb4cdf 100644 --- a/contrib/libbluray/module.defs +++ b/contrib/libbluray/module.defs @@ -1,7 +1,7 @@ $(eval $(call import.MODULE.defs,LIBBLURAY,libbluray,LIBXML2)) $(eval $(call import.CONTRIB.defs,LIBBLURAY)) -LIBBLURAY.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libbluray-0.0.1-pre-129-g67ee7bc.tar.gz +LIBBLURAY.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libbluray-0.0.1-pre-213-ga869da8.tar.gz LIBBLURAY.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache; ./bootstrap; diff --git a/libhb/bd.c b/libhb/bd.c index 3309d3f7e..07d31f767 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -436,6 +436,7 @@ int hb_bd_main_feature( hb_bd_t * d, hb_list_t * list_title ) int ii; uint64_t longest_duration = 0; int highest_rank = 0; + int most_chapters = 0; int rank[8] = {0, 1, 3, 2, 6, 5, 7, 4}; BLURAY_TITLE_INFO * ti; @@ -455,6 +456,14 @@ int hb_bd_main_feature( hb_bd_t * d, hb_list_t * list_title ) longest = title->index; longest_duration = title->duration; highest_rank = rank[bdvideo->format]; + most_chapters = ti->chapter_count; + } + else if (highest_rank == rank[bdvideo->format] && + title->duration == longest_duration && + ti->chapter_count > most_chapters) + { + longest = title->index; + most_chapters = ti->chapter_count; } } bd_free_title_info( ti ); @@ -588,6 +597,10 @@ hb_buffer_t * hb_bd_read( hb_bd_t * d ) hb_deep_log(2, "bd: Playitem %u", event.param); break; + case BD_EVENT_STILL: + bd_read_skip_still( d->bd ); + break; + default: break; } diff --git a/test/test.c b/test/test.c index 7e5112e36..d2b30124a 100644 --- a/test/test.c +++ b/test/test.c @@ -3369,7 +3369,7 @@ static int ParseOptions( int argc, char ** argv ) return 0; } -char * str_printf(const char *fmt, ...) +static char * str_printf(const char *fmt, ...) { /* Guess we need no more than 100 bytes. */ int len; |