ifo_handle_t * vts = NULL;
int pgc_id, pgn, i;
hb_chapter_t * chapter;
- uint64_t duration;
- float duration_correction;
unsigned char unused[1024];
const char * codec_name;
hb_list_add( title->list_chapter, chapter );
}
- /* The durations we get for chapters aren't precise. Scale them so
- the total matches the title duration */
- duration = 0;
- for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
- {
- chapter = hb_list_item( title->list_chapter, i );
- duration += chapter->duration;
- }
- duration_correction = (float) title->duration / (float) duration;
for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
{
chapter = hb_list_item( title->list_chapter, i );
- chapter->duration = duration_correction * chapter->duration;
int seconds = ( chapter->duration + 45000 ) / 90000;
chapter->hours = ( seconds / 3600 );
if( fps > 0 )
{
- ms += ((dt->frame_u & 0x30) >> 3) * 5 +
- (dt->frame_u & 0x0f) * 1000.0 / fps;
+ ms += (((dt->frame_u & 0x30) >> 3) * 5 +
+ (dt->frame_u & 0x0f)) * 1000.0 / fps;
}
return ms;
int count;
uint64_t duration, longest;
int longest_pgcn, longest_pgn, longest_pgcn_end;
- float duration_correction;
const char * name;
const char * codec_name;
hb_log( "scan: title %d has %d chapters", t, c );
- duration = 0;
count = hb_list_count( title->list_chapter );
for (i = 0; i < count; i++)
{
#undef cp
cell_cur = FindNextCell( pgc, cell_cur );
}
- duration += chapter->duration;
}
- /* The durations we get for chapters aren't precise. Scale them so
- the total matches the title duration */
- duration_correction = (float) title->duration / (float) duration;
for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
{
chapter = hb_list_item( title->list_chapter, i );
- chapter->duration = duration_correction * chapter->duration;
int seconds = ( chapter->duration + 45000 ) / 90000;
chapter->hours = ( seconds / 3600 );
if( fps > 0 )
{
- ms += ((dt->frame_u & 0x30) >> 3) * 5 +
- (dt->frame_u & 0x0f) * 1000.0 / fps;
+ ms += (((dt->frame_u & 0x30) >> 3) * 5 +
+ (dt->frame_u & 0x0f)) * 1000.0 / fps;
}
return ms;