static void compute_frame_duration( hb_work_private_t *pv )
{
double duration = 0.;
- int64_t max_fps = 64L;
+ int64_t max_fps = 64LL;
// context->time_base may be in fields, so set the max *fields* per second
if ( pv->context->ticks_per_frame > 1 )
// Because the time bases are so screwed up, we only take values
// in the range 8fps - 64fps.
AVRational *tb = NULL;
- if ( st->avg_frame_rate.den * 64L > st->avg_frame_rate.num &&
- st->avg_frame_rate.num > st->avg_frame_rate.den * 8L )
+ if ( st->avg_frame_rate.den * 64LL > st->avg_frame_rate.num &&
+ st->avg_frame_rate.num > st->avg_frame_rate.den * 8LL )
{
tb = &(st->avg_frame_rate);
duration = (double)tb->den / (double)tb->num;
}
- else if ( st->time_base.num * 64L > st->time_base.den &&
- st->time_base.den > st->time_base.num * 8L )
+ else if ( st->time_base.num * 64LL > st->time_base.den &&
+ st->time_base.den > st->time_base.num * 8LL )
{
tb = &(st->time_base);
duration = (double)tb->num / (double)tb->den;
}
if ( !duration &&
pv->context->time_base.num * max_fps > pv->context->time_base.den &&
- pv->context->time_base.den > pv->context->time_base.num * 8L )
+ pv->context->time_base.den > pv->context->time_base.num * 8LL )
{
duration = (double)pv->context->time_base.num /
(double)pv->context->time_base.den;
else
{
if ( pv->context->time_base.num * max_fps > pv->context->time_base.den &&
- pv->context->time_base.den > pv->context->time_base.num * 8L )
+ pv->context->time_base.den > pv->context->time_base.num * 8LL )
{
duration = (double)pv->context->time_base.num /
(double)pv->context->time_base.den;
};
#define SSA_2_HB_TIME(hr,min,sec,centi) \
- ( 90L * ( hr * 1000L * 60 * 60 +\
- min * 1000L * 60 +\
- sec * 1000L +\
- centi * 10L ) )
+ ( 90LL * ( hr * 1000LL * 60 * 60 +\
+ min * 1000LL * 60 +\
+ sec * 1000LL +\
+ centi * 10LL ) )
#define SSA_VERBOSE_PACKETS 0
longest_duration_fallback = title->duration;
longest_fallback = title->index;
}
- if ( title->duration > 90000L * 60 * 30 )
+ if ( title->duration > 90000LL * 60 * 30 )
{
avg_duration += title->duration;
avg_cnt++;
longest = longest_title;
}
if ((float)longest_duration_fallback * 0.7 > longest_duration &&
- longest_duration < 90000L * 60 * 30 )
+ longest_duration < 90000LL * 60 * 30 )
{
float factor = (float)avg_duration / longest_duration;
if ( factor > 1 )
// timebase for the stream to HB's 90kHz timebase.
AVStream *s = stream->ffmpeg_ic->streams[stream->ffmpeg_pkt->stream_index];
double tsconv = (double)90000. * s->time_base.num / s->time_base.den;
- int64_t offset = 90000L * ffmpeg_initial_timestamp(stream) / AV_TIME_BASE;
+ int64_t offset = 90000LL * ffmpeg_initial_timestamp(stream) / AV_TIME_BASE;
buf->s.start = av_to_hb_pts(stream->ffmpeg_pkt->pts, tsconv, offset);
buf->s.renderOffset = av_to_hb_pts(stream->ffmpeg_pkt->dts, tsconv, offset);
{
cur = sync->cur;
cur->s.start = sync->next_start;
- cur->s.stop = cur->s.start + 90000L *
+ cur->s.stop = cur->s.start + 90000LL *
job->vrate.den / job->vrate.num;
/* Make sure last frame is reflected in frame count */
// compute actual output vrate from first pass
int64_t num, den;
- num = interjob->out_frame_count * 90000L;
+ num = interjob->out_frame_count * 90000LL;
den = interjob->total_time;
hb_limit_rational64(&num, &den, num, den, INT_MAX);