]> granicus.if.org Git - handbrake/commitdiff
libhb: use LL for int64 constants to make mingw happy
authorJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 27 Dec 2015 00:45:37 +0000 (17:45 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Sun, 27 Dec 2015 00:46:15 +0000 (17:46 -0700)
libhb/decavcodec.c
libhb/decssasub.c
libhb/dvdnav.c
libhb/stream.c
libhb/sync.c
libhb/work.c

index ab801192294f2b7b6dad3edd09d0dabe3903527d..af4349ec372a4194fd5c99da9d5ce191d39d20ab 100644 (file)
@@ -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;
index 0f6ac042bf6e7c80badac280fa7e429d38f4f8dc..4eb190082b528e23cc558de191c6c6caf00f29b6 100644 (file)
@@ -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
 
index 09dc411f8a9b9d0e9a04837b680fdc636e4ccd0a..6d06cddd927f63ee384f7ffd42ff87d4b90dbb37 100644 (file)
@@ -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 )
index 57fd74f947940fc8c6082541712dc4b06e16d9b4..f076541d70589a5b143649930ea350e8e85d1a4e 100644 (file)
@@ -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);
index 512c00a8ee0e5fa8a77792ad7391bf42809c53e1..b48fc68a1d5e0416718113427e83c8f11b3f11d6 100644 (file)
@@ -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 */
index 7de0c0247b96d9b6a601438ab06afa5cb2f1d29b..e2b3b095ace2122ba451aa7e5906aa6c0f02e00a 100644 (file)
@@ -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);