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 /libhb | |
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
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/bd.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; } |