diff options
author | John Stebbins <[email protected]> | 2015-12-26 17:45:37 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-12-26 17:46:15 -0700 |
commit | 4e396c75f8e310a90c86d7f540d33261e70cb7c1 (patch) | |
tree | 84d9184a55d9b835dda3c46dfe80cd3102f604db | |
parent | 62fba0145cf1e1f4167ab713632c85815911cb59 (diff) |
libhb: use LL for int64 constants to make mingw happy
-rw-r--r-- | libhb/decavcodec.c | 14 | ||||
-rw-r--r-- | libhb/decssasub.c | 8 | ||||
-rw-r--r-- | libhb/dvdnav.c | 4 | ||||
-rw-r--r-- | libhb/stream.c | 2 | ||||
-rw-r--r-- | libhb/sync.c | 2 | ||||
-rw-r--r-- | libhb/work.c | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index ab8011922..af4349ec3 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1912,7 +1912,7 @@ static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in, 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 ) @@ -1942,14 +1942,14 @@ static void compute_frame_duration( hb_work_private_t *pv ) // 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; @@ -1957,7 +1957,7 @@ static void compute_frame_duration( hb_work_private_t *pv ) } 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; @@ -1972,7 +1972,7 @@ static void compute_frame_duration( hb_work_private_t *pv ) 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; diff --git a/libhb/decssasub.c b/libhb/decssasub.c index 0f6ac042b..4eb190082 100644 --- a/libhb/decssasub.c +++ b/libhb/decssasub.c @@ -41,10 +41,10 @@ struct hb_work_private_s }; #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 diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 09dc411f8..6d06cddd9 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -1323,7 +1323,7 @@ static int hb_dvdnav_main_feature( hb_dvd_t * e, hb_list_t * list_title ) 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++; @@ -1419,7 +1419,7 @@ static int hb_dvdnav_main_feature( hb_dvd_t * e, hb_list_t * list_title ) 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 ) diff --git a/libhb/stream.c b/libhb/stream.c index 57fd74f94..f076541d7 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -5735,7 +5735,7 @@ hb_buffer_t * hb_ffmpeg_read( hb_stream_t *stream ) // 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); diff --git a/libhb/sync.c b/libhb/sync.c index 512c00a8e..b48fc68a1 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -606,7 +606,7 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in, { 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 */ diff --git a/libhb/work.c b/libhb/work.c index 7de0c0247..e2b3b095a 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -647,7 +647,7 @@ void correct_framerate( hb_interjob_t * interjob, hb_job_t * job ) // 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); |