diff options
author | Rodeo <[email protected]> | 2012-05-03 16:04:28 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-05-03 16:04:28 +0000 |
commit | 4aeadc9bc63d200d6c0b709eba7e25c4f3afe24c (patch) | |
tree | 4d73da1a557826fd4b553172180f6cd455b5ecbb /libhb/bd.c | |
parent | 9b3507211cff2ddf6bec9072d7767e461bdc0fa7 (diff) |
libhb: if no source chapter name information is available, set default chapters names explicitly (rather than leaving it to the interfaces).
Standardize calculation of chapter->hours, chapter->minutes and chapter->seconds across all sources.
Get rid of an unused variable in libhb/dvd.c
Ignore chapter names set by MakeMKV. "Chapter 1" is just as good as, if not better than "Chapter 01" or even "Chapter 00".
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4636 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/bd.c')
-rw-r--r-- | libhb/bd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libhb/bd.c b/libhb/bd.c index bb051115a..f980dac03 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -457,14 +457,15 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration ) chapter = calloc( sizeof( hb_chapter_t ), 1 ); chapter->index = ii + 1; + sprintf( chapter->title, "Chapter %d", chapter->index ); + chapter->duration = ti->chapters[ii].duration; chapter->block_start = ti->chapters[ii].offset; - int seconds; - seconds = ( chapter->duration + 45000 ) / 90000; - chapter->hours = seconds / 3600; - chapter->minutes = ( seconds % 3600 ) / 60; - chapter->seconds = seconds % 60; + int seconds = ( chapter->duration + 45000 ) / 90000; + chapter->hours = ( seconds / 3600 ); + chapter->minutes = ( seconds % 3600 ) / 60; + chapter->seconds = ( seconds % 60 ); hb_log( "bd: chap %d packet=%"PRIu64", %"PRId64" ms", chapter->index, |