]> git.sesse.net Git - vlc/commitdiff
Remove I64C as well
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 1 May 2008 19:11:47 +0000 (22:11 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 1 May 2008 19:11:47 +0000 (22:11 +0300)
60 files changed:
include/vlc_common.h
modules/access/cdda.c
modules/access/cdda/info.c
modules/access/dc1394.c
modules/access/dvb/http.c
modules/access/file.c
modules/access/ftp.c
modules/access/gnomevfs.c
modules/access/mms/mmsh.c
modules/access/mms/mmstu.c
modules/access/rtmp/access.c
modules/access/tcp.c
modules/access/v4l.c
modules/access/v4l2/v4l2.c
modules/audio_output/directx.c
modules/codec/dmo/dmo.c
modules/codec/ffmpeg/encoder.c
modules/codec/ffmpeg/mux.c
modules/codec/ffmpeg/video.c
modules/codec/flac.c
modules/codec/rawvideo.c
modules/codec/theora.c
modules/codec/x264.c
modules/control/http/http.c
modules/demux/a52.c
modules/demux/dts.c
modules/demux/flac.c
modules/demux/live555.cpp
modules/demux/mkv.cpp
modules/demux/mp4/libmp4.c
modules/demux/mp4/mp4.c
modules/demux/mpc.c
modules/demux/mpeg/m4a.c
modules/demux/mpeg/mpga.c
modules/demux/ogg.c
modules/demux/playlist/m3u.c
modules/demux/rawdv.c
modules/demux/rawvid.c
modules/demux/ts.c
modules/demux/tta.c
modules/demux/vc1.c
modules/gui/pda/pda.c
modules/gui/wince/interface.cpp
modules/mux/mp4.c
modules/mux/mpeg/ts.c
modules/mux/ogg.c
modules/packetizer/mpeg4video.c
modules/packetizer/vc1.c
modules/stream_out/rtp.c
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
modules/video_filter/deinterlace.c
modules/video_filter/mosaic.c
src/extras/libc.c
src/input/clock.c
src/input/demux.c
src/input/input.c
src/input/stream.c
src/misc/mtime.c
src/network/httpd.c
src/stream_output/stream_output.c

index 4b9404dbdc3549e9024ea4c3cbea2ba55a064b33..a0f7a3d066376ab4352ba7dc0993aa50d49b2b5a 100644 (file)
@@ -862,9 +862,6 @@ VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) );
 #   define telldir vlc_telldir
 #endif
 
-/* 64 bits integer constant suffix */
-#define I64C(x)  INT64_C(x)
-
 #if defined(WIN32) || defined(UNDER_CE)
 /* win32, cl and icl support */
 #   if defined( _MSC_VER ) || !defined( __MINGW32__ )
index 13c3f334443b553ce739f92788f85fd3817053be..715fd8be71acd3e3757e6e42ccd1e6fe7d74b2fe 100644 (file)
@@ -547,7 +547,7 @@ static void GetCDDBInfo( access_t *p_access, int i_titles, int *p_sectors )
         cddb_disc_add_track( p_access->p_sys->p_disc, t );
         i_size = ( p_sectors[i+1] - p_sectors[i] ) *
                    (int64_t)CDDA_DATA_SIZE;
-        i_length += I64C(1000000) * i_size / 44100 / 4  ;
+        i_length += INT64_C(1000000) * i_size / 44100 / 4  ;
     }
 
     cddb_disc_set_length( p_access->p_sys->p_disc, (int)(i_length/1000000) );
index 40333722641d320cc683e8f173386977c1fcfb5e..425755c103c7bee019c2246538a59de790079129 100644 (file)
@@ -907,7 +907,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
         asprintf( &t->psz_name, _("Track %i"), i_track );
         t->i_size = i_track_frames * (int64_t) CDIO_CD_FRAMESIZE_RAW;
 
-        t->i_length = I64C(1000000) * t->i_size / CDDA_FREQUENCY_SAMPLE / 4;
+        t->i_length = INT64_C(1000000) * t->i_size / CDDA_FREQUENCY_SAMPLE / 4;
 
     if( p_item )
     {
@@ -939,7 +939,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
             asprintf( &t->psz_name, _("Track %i"), i_track );
             t->i_size = i_track_frames * (int64_t) CDIO_CD_FRAMESIZE_RAW;
 
-            t->i_length = I64C(1000000) * t->i_size
+            t->i_length = INT64_C(1000000) * t->i_size
           / CDDA_FREQUENCY_SAMPLE / 4;
 
         if ( ! p_cdda->b_nav_mode ) {
index 3b9654ccf610e24a0c87b4702485501c1162dbe4..453fe87762e070028800b27eeb5c42e58cdb176d 100644 (file)
@@ -750,7 +750,7 @@ static block_t *GrabAudio( demux_t *p_demux )
         i_correct += buf_info.bytes;
 
     p_block->i_pts = p_block->i_dts =
-                        mdate() - I64C(1000000) * (mtime_t)i_correct /
+                        mdate() - INT64_C(1000000) * (mtime_t)i_correct /
                         2 / p_sys->channels / p_sys->i_sample_rate;
     return p_block;
 }
index f3cb63925c8b0823949ce65cfd6bcdfaa8cd5071..d65253e45992c5fede8e23424828dfe5fcaa224f 100644 (file)
@@ -255,7 +255,7 @@ static int HttpCallback( httpd_file_sys_t *p_args,
 
     vlc_mutex_lock( &p_sys->httpd_mutex );
 
-    p_sys->i_httpd_timeout = mdate() + I64C(3000000); /* 3 s */
+    p_sys->i_httpd_timeout = mdate() + INT64_C(3000000); /* 3 s */
     p_sys->psz_request = psz_request;
     p_sys->b_request_frontend_info = true;
     if ( p_sys->i_ca_handle )
index 59d3b62c1b623fdab5bfcdb324d25d696ebd0f67..79274aeac5c68e20e711944d7b02cce7e52bf2ca 100644 (file)
@@ -353,7 +353,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
-            *pi_64 = var_GetInteger( p_access, "file-caching" ) * I64C(1000);
+            *pi_64 = var_GetInteger( p_access, "file-caching" ) * INT64_C(1000);
             break;
 
         /* */
index c171b71d35e13ea41b3a6d9e7b26677547e272bb..36a49c61082d70f87e57e0172e3ebbbaf74d21a5 100644 (file)
@@ -549,7 +549,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             var_Get( p_access, "ftp-caching", &val );
-            *pi_64 = (int64_t)var_GetInteger( p_access, "ftp-caching" ) * I64C(1000);
+            *pi_64 = (int64_t)var_GetInteger( p_access, "ftp-caching" ) * INT64_C(1000);
             break;
 
         /* */
index 2249139ffa9e89017d6646bb99a915428fe52bc0..d446c03fd11b1fb55d2f2139902eee208febee58 100644 (file)
@@ -403,7 +403,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = var_GetInteger( p_access,
-                                        "gnomevfs-caching" ) * I64C(1000);
+                                        "gnomevfs-caching" ) * INT64_C(1000);
             break;
 
         /* */
index e6eb32a74542bac65dd6fce4dc73a680055eb980..a9779d2af7af870473c8be0df71108b17ba7e775 100644 (file)
@@ -271,7 +271,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
-            *pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * I64C(1000);
+            *pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * INT64_C(1000);
             break;
 
         case ACCESS_GET_PRIVATE_ID_STATE:
index b3d7af702ab598210d35617dd6c49d67b2b0a28b..47711662dd3baa19c1b127807e019a8a9fb2581e 100644 (file)
@@ -260,7 +260,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             var_Get( p_access, "mms-caching", &val );
-            *pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * I64C(1000);
+            *pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * INT64_C(1000);
             break;
 
         case ACCESS_GET_PRIVATE_ID_STATE:
index 4961b74c2a755b319dde51f912bc472919d15f24..0182f8f067f98edc19edb704836441ec6ae951d6 100644 (file)
@@ -467,7 +467,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
-            *pi_64 = var_GetInteger( p_access, "rtmp-caching" ) * I64C(1000);
+            *pi_64 = var_GetInteger( p_access, "rtmp-caching" ) * INT64_C(1000);
             break;
 
         /* */
index e4e3ab78549bc0a056f506985995084a34fb6b11..1ae0350cbb2d2bc23024ae9cd18a78dd58ad108b 100644 (file)
@@ -188,7 +188,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
-            *pi_64 = (int64_t)var_GetInteger( p_access, "tcp-caching" ) * I64C(1000);
+            *pi_64 = (int64_t)var_GetInteger( p_access, "tcp-caching" ) * INT64_C(1000);
             break;
 
         /* */
index 67172dbb66084a8f9e64ee8682b64c384a0ebc8f..be7ab2334772a43975445b96d3ed679704bf38f5 100644 (file)
@@ -1415,7 +1415,7 @@ static block_t *GrabAudio( demux_t *p_demux )
     }
 
     p_block->i_pts = p_block->i_dts =
-        mdate() - I64C(1000000) * (mtime_t)i_correct /
+        mdate() - INT64_C(1000000) * (mtime_t)i_correct /
         2 / ( p_sys->b_stereo ? 2 : 1) / p_sys->i_sample_rate;
 
     return p_block;
index 3d3cf1ed4a98577c9427748b3b8c3cb95ad06487..fb531af398f6168a4f377b472b25bda08d4b0afd 100644 (file)
@@ -1646,7 +1646,7 @@ static block_t* GrabAudio( demux_t *p_demux )
 
     /* Timestamp */
     p_block->i_pts = p_block->i_dts =
-        mdate() - I64C(1000000) * (mtime_t)i_correct /
+        mdate() - INT64_C(1000000) * (mtime_t)i_correct /
         2 / ( p_sys->b_stereo ? 2 : 1) / p_sys->i_sample_rate;
 
     return p_block;
index 292817bf38e35d85d804caf3daca8185244c9400..22573cb130f9321c8bb462408c1bfacdd52e22ac 100644 (file)
@@ -1043,7 +1043,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
 
         /* Detect underruns */
         if( l_queued && mtime - last_time >
-            I64C(1000000) * l_queued / p_aout->output.output.i_rate )
+            INT64_C(1000000) * l_queued / p_aout->output.output.i_rate )
         {
             msg_Dbg( p_aout, "detected underrun!" );
         }
@@ -1058,7 +1058,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
         for( i = 0; i < l_free_slots; i++ )
         {
             aout_buffer_t *p_buffer = aout_OutputNextBuffer( p_aout,
-                mtime + I64C(1000000) * (i * FRAME_SIZE + l_queued) /
+                mtime + INT64_C(1000000) * (i * FRAME_SIZE + l_queued) /
                 p_aout->output.output.i_rate, b_sleek );
 
             /* If there is no audio data available and we have some buffered
@@ -1071,7 +1071,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
 
         /* Sleep a reasonable amount of time */
         l_queued += (i * FRAME_SIZE);
-        msleep( I64C(1000000) * l_queued / p_aout->output.output.i_rate / 2 );
+        msleep( INT64_C(1000000) * l_queued / p_aout->output.output.i_rate / 2 );
     }
 
     /* make sure the buffer isn't playing */
index acbe5e39c05bbabfb6c5dc5363ed148e51614edf..c635a07d89eceb7bb6cb1b7f10c22fca87a3b9db 100644 (file)
@@ -1058,7 +1058,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
     vih.rcSource.bottom = p_enc->fmt_in.video.i_height;
     vih.rcTarget = vih.rcSource;
 
-    vih.AvgTimePerFrame = I64C(10000000) / 25; //FIXME
+    vih.AvgTimePerFrame = INT64_C(10000000) / 25; //FIXME
 
     dmo_type.majortype = MEDIATYPE_Video;
     //dmo_type.subtype = MEDIASUBTYPE_RGB24;
index 4963e5752d9d032db84834f398902d0adb6fafa0..eaa5b14023505cb2c89b1d86b8a0505c71851c20 100644 (file)
@@ -908,7 +908,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
         memcpy( p_block->p_buffer, p_sys->p_buffer_out, i_out );
 
         /* FIXME, 3-2 pulldown is not handled correctly */
-        p_block->i_length = I64C(1000000) *
+        p_block->i_length = INT64_C(1000000) *
             p_enc->fmt_in.video.i_frame_rate_base /
                 p_enc->fmt_in.video.i_frame_rate;
 
index def43e58f1a2d5cb4e9e64809fb8f0dee5cf6112..6882402e8b16cc84456ca78f201e434dbe55a7ac 100644 (file)
@@ -363,14 +363,14 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
 
     if( p_data->i_pts > 0 )
         pkt.pts = p_data->i_pts * p_stream->time_base.den /
-            I64C(1000000) / p_stream->time_base.num;
+            INT64_C(1000000) / p_stream->time_base.num;
     if( p_data->i_dts > 0 )
         pkt.dts = p_data->i_dts * p_stream->time_base.den /
-            I64C(1000000) / p_stream->time_base.num;
+            INT64_C(1000000) / p_stream->time_base.num;
 
     /* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */
     p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den /
-            I64C(1000000) / p_stream->time_base.num ) - 1;
+            INT64_C(1000000) / p_stream->time_base.num ) - 1;
 
     if( av_write_frame( p_sys->oc, &pkt ) < 0 )
     {
index bff947dd42b17484a8c7620fb194998f97122aae..d2faa83c8b28d0a4ce81594f51d3b167bd219c27 100644 (file)
@@ -464,7 +464,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
     }
 
     if( !p_dec->b_pace_control && (p_sys->i_late_frames > 0) &&
-        (mdate() - p_sys->i_late_frames_start > I64C(5000000)) )
+        (mdate() - p_sys->i_late_frames_start > INT64_C(5000000)) )
     {
         if( p_sys->i_pts )
         {
@@ -676,7 +676,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
             if( p_dec->fmt_in.video.i_frame_rate > 0 &&
                 p_dec->fmt_in.video.i_frame_rate_base > 0 )
             {
-                p_sys->i_pts += I64C(1000000) *
+                p_sys->i_pts += INT64_C(1000000) *
                     (2 + p_sys->p_ff_pic->repeat_pict) *
                     p_dec->fmt_in.video.i_frame_rate_base *
                     p_block->i_rate / INPUT_RATE_DEFAULT /
@@ -684,7 +684,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
             }
             else if( p_sys->p_context->time_base.den > 0 )
             {
-                p_sys->i_pts += I64C(1000000) *
+                p_sys->i_pts += INT64_C(1000000) *
                     (2 + p_sys->p_ff_pic->repeat_pict) *
                     p_sys->p_context->time_base.num *
                     p_block->i_rate / INPUT_RATE_DEFAULT /
index 9e0b97f69e9e8b7efb0717a19f4578ffc8f6f309..2d903e4fef6673080a9970ae3295f4bf40afba8c 100644 (file)
@@ -1015,12 +1015,12 @@ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf,
     if( i_blocksize_hint && b_variable_blocksize )
     {
         i_sample_number = read_utf8( &p_buf[i_header++], &i_read );
-        if( i_sample_number == I64C(0xffffffffffffffff) ) return 0;
+        if( i_sample_number == INT64_C(0xffffffffffffffff) ) return 0;
     }
     else
     {
         i_sample_number = read_utf8( &p_buf[i_header++], &i_read );
-        if( i_sample_number == I64C(0xffffffffffffffff) ) return 0;
+        if( i_sample_number == INT64_C(0xffffffffffffffff) ) return 0;
 
         if( p_sys->b_stream_info )
             i_sample_number *= p_sys->stream_info.min_blocksize;
@@ -1105,14 +1105,14 @@ static uint64_t read_utf8( const uint8_t *p_buf, int *pi_read )
         i = 6;
     }
     else {
-        return I64C(0xffffffffffffffff);
+        return INT64_C(0xffffffffffffffff);
     }
 
     for( j = 1; j <= i; j++ )
     {
         if( !(p_buf[j] & 0x80) || (p_buf[j] & 0x40) ) /* 10xxxxxx */
         {
-            return I64C(0xffffffffffffffff);
+            return INT64_C(0xffffffffffffffff);
         }
         i_result <<= 6;
         i_result |= (p_buf[j] & 0x3F);
index d767911d64f109c6430afee9db946b8b9d380a3c..57da0bebd6cfe4acc93fd40e9800e8a96cec11a0 100644 (file)
@@ -248,7 +248,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     }
 
     /* Date management: 1 frame per packet */
-    p_sys->i_pts += ( I64C(1000000) * 1.0 / 25 /*FIXME*/ );
+    p_sys->i_pts += ( INT64_C(1000000) * 1.0 / 25 /*FIXME*/ );
     *pp_block = NULL;
 
     return p_buf;
index 225a395d06cc613f273b2c73efe58de0b10a33d6..0ac1e76963b15a6dfbdcd265b13bc95479f51930 100644 (file)
@@ -443,7 +443,7 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
     }
 
     /* Date management */
-    p_sys->i_pts += ( I64C(1000000) * p_sys->ti.fps_denominator /
+    p_sys->i_pts += ( INT64_C(1000000) * p_sys->ti.fps_denominator /
                       p_sys->ti.fps_numerator ); /* 1 frame per packet */
 
     return p_buf;
index 97ec2108bdc598447e6eb1a0e543dd32f1e7a050..a5c4ac4afa7dfb8e87abf9b94b0671d0c54cee7c 100644 (file)
@@ -1337,7 +1337,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
         p_block->i_flags |= BLOCK_FLAG_TYPE_B;
 
     /* This isn't really valid for streams with B-frames */
-    p_block->i_length = I64C(1000000) *
+    p_block->i_length = INT64_C(1000000) *
         p_enc->fmt_in.video.i_frame_rate_base /
             p_enc->fmt_in.video.i_frame_rate;
 
index 42a70ba6f41fb92daf7e19e04e9a04e9c773db1a..254e149792aa09071a7914a1153faedd61b5db3e 100644 (file)
@@ -442,9 +442,9 @@ static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer,
         var_Get( p_sys->p_input, "position", &val);
         sprintf( position, "%d" , (int)((val.f_float) * 100.0));
         var_Get( p_sys->p_input, "time", &val);
-        sprintf( time, "%"PRIi64, (int64_t)val.i_time / I64C(1000000) );
+        sprintf( time, "%"PRIi64, (int64_t)val.i_time / INT64_C(1000000) );
         var_Get( p_sys->p_input, "length", &val);
-        sprintf( length, "%"PRIi64, (int64_t)val.i_time / I64C(1000000) );
+        sprintf( length, "%"PRIi64, (int64_t)val.i_time / INT64_C(1000000) );
 
         var_Get( p_sys->p_input, "state", &val );
         if( val.i_int == PLAYING_S )
index 27207dc82f7a6d19a57a858738e88277a5be0b90..768860424da15ce5ea11a343dee4142741289dbe 100644 (file)
@@ -227,7 +227,7 @@ static int Demux( demux_t *p_demux )
             if( p_block_out->i_length )
             {
                 p_sys->i_mux_rate =
-                    p_block_out->i_buffer * I64C(1000000)/p_block_out->i_length;
+                    p_block_out->i_buffer * INT64_C(1000000)/p_block_out->i_length;
             }
 
             /* set PCR */
index 66ee28076ca5fbe684951a9cb0e095996bb636e8..a8e9b32325566595b6954fef420bdb08b349e57a 100644 (file)
@@ -208,7 +208,7 @@ static int Demux( demux_t *p_demux )
             if( p_block_out->i_length )
             {
                 p_sys->i_mux_rate =
-                    p_block_out->i_buffer * I64C(1000000) / p_block_out->i_length;
+                    p_block_out->i_buffer * INT64_C(1000000) / p_block_out->i_length;
             }
 
             /* set PCR */
index 3d9bf2456ad206737c9b38607b4082e0be5024f3..edf47c010565c4358a438089dc84a8f73908dc16 100644 (file)
@@ -316,7 +316,7 @@ static int ControlSetTime( demux_t *p_demux, int64_t i_time )
                             (p_sys->seekpoint[i+1]->i_time_offset-p_sys->seekpoint[i]->i_time_offset);
 
     /* XXX We do exact seek if it's not too far away(45s) */
-    if( i_delta_time < 45*I64C(1000000) )
+    if( i_delta_time < 45*INT64_C(1000000) )
     {
         if( stream_Seek( p_demux->s, p_sys->seekpoint[i]->i_byte_offset+p_sys->i_data_pos ) )
             return VLC_EGENERIC;
@@ -462,7 +462,7 @@ static int  ReadMeta( demux_t *p_demux, uint8_t **pp_streaminfo, int *pi_streami
     /* */
     ParseStreamInfo( p_demux, &i_sample_rate, &i_sample_count,  *pp_streaminfo, *pi_streaminfo );
     if( i_sample_rate > 0 )
-        p_sys->i_length = i_sample_count * I64C(1000000)/i_sample_rate;
+        p_sys->i_length = i_sample_count * INT64_C(1000000)/i_sample_rate;
 
     /* Be sure we have seekpoint 0 */
     s = vlc_seekpoint_New();
@@ -516,7 +516,7 @@ static void ParseStreamInfo( demux_t *p_demux, int *pi_rate, int64_t *pi_count,
     const int i_skip = 4+4;
 
     *pi_rate = GetDWBE(&p_data[i_skip+4+6]) >> 12;
-    *pi_count = GetQWBE(&p_data[i_skip+4+6]) &  ((I64C(1)<<36)-1);
+    *pi_count = GetQWBE(&p_data[i_skip+4+6]) &  ((INT64_C(1)<<36)-1);
 }
 
 static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, int i_data,
@@ -539,7 +539,7 @@ static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, int i_data,
             continue;
 
         s = vlc_seekpoint_New();
-        s->i_time_offset = i_sample * I64C(1000000)/i_sample_rate;
+        s->i_time_offset = i_sample * INT64_C(1000000)/i_sample_rate;
         s->i_byte_offset = GetQWBE( &p_data[4+18*i+8] );
 
         /* Check for duplicate entry */
index 1968117073f624db7f5821ad5b3e38bb15f6a695..1e985f4abce9a6b8301e77870f43a31314733886 100644 (file)
@@ -1382,7 +1382,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_SET_PAUSE_STATE:
         {
-            double d_npt = (double) p_sys->i_npt / I64C(1000000);
+            double d_npt = (double) p_sys->i_npt / INT64_C(1000000);
             int i;
 
             b_bool = (bool)va_arg( args, int );
index cb81202bb657770e738109d6a18fd68ce326248d..e14a94750e72b6188b7342ad2da21799cb1885ed 100644 (file)
@@ -4868,14 +4868,14 @@ void matroska_segment_c::ParseChapterAtom( int i_level, KaxChapterAtom *ca, chap
         else if( MKV_IS_ID( l, KaxChapterTimeStart ) )
         {
             KaxChapterTimeStart &start =*(KaxChapterTimeStart*)l;
-            chapters.i_start_time = uint64( start ) / I64C(1000);
+            chapters.i_start_time = uint64( start ) / INT64_C(1000);
 
             msg_Dbg( &sys.demuxer, "|   |   |   |   + ChapterTimeStart: %lld", chapters.i_start_time );
         }
         else if( MKV_IS_ID( l, KaxChapterTimeEnd ) )
         {
             KaxChapterTimeEnd &end =*(KaxChapterTimeEnd*)l;
-            chapters.i_end_time = uint64( end ) / I64C(1000);
+            chapters.i_end_time = uint64( end ) / INT64_C(1000);
 
             msg_Dbg( &sys.demuxer, "|   |   |   |   + ChapterTimeEnd: %lld", chapters.i_end_time );
         }
@@ -5080,7 +5080,7 @@ void matroska_segment_c::ParseChapters( KaxChapters *chapters )
     if ( stored_editions.size() != 0 && stored_editions[i_default_edition]->b_ordered )
     {
         /* update the duration of the segment according to the sum of all sub chapters */
-        i_dur = stored_editions[i_default_edition]->Duration() / I64C(1000);
+        i_dur = stored_editions[i_default_edition]->Duration() / INT64_C(1000);
         if (i_dur > 0)
             i_duration = i_dur;
     }
index d66e173b4780e7dcfc1a7007f8ec601920b74d04..16cb872646fbd1c9320c4d80c0725c67b59411d1 100644 (file)
@@ -154,7 +154,7 @@ static void MP4_ConvertDate2Str( char *psz, uint64_t i_date )
     int i_sec;
 
     /* date begin at 1 jan 1904 */
-    i_date += ((I64C(1904) * 365) + 17) * 24 * 60 * 60;
+    i_date += ((INT64_C(1904) * 365) + 17) * 24 * 60 * 60;
 
     i_day = i_date / ( 60*60*24);
     i_hour = ( i_date /( 60*60 ) ) % 60;
index 174006b7e54bfb39e21e2349ac1104425d79f9e6..6642cc05313f6c9f94b46165239e2a2c4756e302 100644 (file)
@@ -229,7 +229,7 @@ static inline int64_t MP4_TrackGetDTS( demux_t *p_demux, mp4_track_t *p_track )
         if( i_dts < 0 ) i_dts = 0;
     }
 
-    return I64C(1000000) * i_dts / p_track->i_timescale;
+    return INT64_C(1000000) * i_dts / p_track->i_timescale;
 }
 
 static inline int64_t MP4_TrackGetPTSDelta( demux_t *p_demux, mp4_track_t *p_track )
@@ -244,7 +244,7 @@ static inline int64_t MP4_TrackGetPTSDelta( demux_t *p_demux, mp4_track_t *p_tra
     for( i_index = 0;; i_index++ )
     {
         if( i_sample < ck->p_sample_count_pts[i_index] )
-            return ck->p_sample_offset_pts[i_index] * I64C(1000000) /
+            return ck->p_sample_offset_pts[i_index] * INT64_C(1000000) /
                    (int64_t)p_track->i_timescale;
 
         i_sample -= ck->p_sample_count_pts[i_index];
@@ -253,7 +253,7 @@ static inline int64_t MP4_TrackGetPTSDelta( demux_t *p_demux, mp4_track_t *p_tra
 
 static inline int64_t MP4_GetMoviePTS(demux_sys_t *p_sys )
 {
-    return I64C(1000000) * p_sys->i_time / p_sys->i_timescale;
+    return INT64_C(1000000) * p_sys->i_time / p_sys->i_timescale;
 }
 
 /* Function to lookup the currently playing item */
@@ -1754,7 +1754,7 @@ static int TrackTimeToSampleChunk( demux_t *p_demux, mp4_track_t *p_track,
 
         /* now calculate i_start for this elst */
         /* offset */
-        i_start -= p_track->i_elst_time * I64C(1000000) / p_sys->i_timescale;
+        i_start -= p_track->i_elst_time * INT64_C(1000000) / p_sys->i_timescale;
         if( i_start < 0 )
         {
             *pi_chunk = 0;
@@ -2052,7 +2052,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
                      elst->i_segment_duration[i] * 1000 / p_sys->i_timescale,
                      elst->i_media_time[i] >= 0 ?
                      (int64_t)(elst->i_media_time[i] * 1000 / p_track->i_timescale) :
-                     I64C(-1),
+                     INT64_C(-1),
                      elst->i_media_rate_integer[i],
                      elst->i_media_rate_fraction[i] );
         }
index 19a9d6c11b4e1309b3c8b2960f9f112f4ef7962d..251df6ebdcf619457b2e8c77bb1db14537f5308a 100644 (file)
@@ -226,7 +226,7 @@ static int Demux( demux_t *p_demux )
     /* */
     p_data->i_buffer = i_ret * sizeof(MPC_SAMPLE_FORMAT) * p_sys->info.channels;
     p_data->i_dts = p_data->i_pts =
-            1 + I64C(1000000) * p_sys->i_position / p_sys->info.sample_freq;
+            1 + INT64_C(1000000) * p_sys->i_position / p_sys->info.sample_freq;
 
     es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_data->i_dts );
 
@@ -257,7 +257,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_GET_LENGTH:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            *pi64 = I64C(1000000) * p_sys->info.pcm_samples /
+            *pi64 = INT64_C(1000000) * p_sys->info.pcm_samples /
                         p_sys->info.sample_freq;
             return VLC_SUCCESS;
 
@@ -272,7 +272,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_GET_TIME:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            *pi64 = I64C(1000000) * p_sys->i_position /
+            *pi64 = INT64_C(1000000) * p_sys->i_position /
                         p_sys->info.sample_freq;
             return VLC_SUCCESS;
 
index 017b4e74c2db4c17caccdd260fcbebbd89b121f7..d6087fc1cf177fe2995af386be2f8640832ff645 100644 (file)
@@ -164,9 +164,9 @@ static int Demux( demux_t *p_demux)
             p_block_out->p_next = NULL;
 
             p_sys->i_pts = p_block_out->i_pts;
-            if( p_sys->i_pts > M4A_PTS_START + I64C(500000) )
+            if( p_sys->i_pts > M4A_PTS_START + INT64_C(500000) )
                 p_sys->i_bitrate_avg =
-                    8*I64C(1000000)*p_sys->i_bytes/(p_sys->i_pts-M4A_PTS_START);
+                    8*INT64_C(1000000)*p_sys->i_bytes/(p_sys->i_pts-M4A_PTS_START);
 
             p_sys->i_bytes += p_block_out->i_buffer;
             es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
@@ -207,7 +207,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         if( (i_query == DEMUX_SET_POSITION || i_query == DEMUX_SET_TIME ) &&
             i_ret == VLC_SUCCESS && p_sys->i_bitrate_avg > 0 )
         {
-            int64_t i_time = I64C(8000000) * stream_Tell(p_demux->s) /
+            int64_t i_time = INT64_C(8000000) * stream_Tell(p_demux->s) /
                 p_sys->i_bitrate_avg;
 
             if( i_time >= 0 )
index eccdea19d3e1d58d1dfd08f2b0c1e69987fd4523..b49f1251282e645c577937ded181dacad8cbc8c3 100644 (file)
@@ -244,7 +244,7 @@ static int Open( vlc_object_t * p_this )
     if( p_sys->i_xing_bytes && p_sys->i_xing_frames &&
         p_sys->i_xing_frame_samples )
     {
-        p_sys->i_bitrate_avg = p_sys->i_xing_bytes * I64C(8) *
+        p_sys->i_bitrate_avg = p_sys->i_xing_bytes * INT64_C(8) *
             p_sys->p_packetizer->fmt_out.audio.i_rate /
             p_sys->i_xing_frames / p_sys->i_xing_frame_samples;
     }
@@ -389,7 +389,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             if( !i_ret && p_sys->i_bitrate_avg > 0 &&
                 (i_query == DEMUX_SET_POSITION || i_query == DEMUX_SET_TIME) )
             {
-                int64_t i_time = I64C(8000000) * stream_Tell(p_demux->s) /
+                int64_t i_time = INT64_C(8000000) * stream_Tell(p_demux->s) /
                     p_sys->i_bitrate_avg;
 
                 /* Fix time_offset */
index fe9441dd760402f1981a1e229426682e9498e3fd..6919a8dae9ed7af4d215c22e08000a32028380c6 100644 (file)
@@ -445,7 +445,7 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
     {
         if( p_stream->fmt.i_codec != VLC_FOURCC( 't','h','e','o' ) )
         {
-            p_stream->i_pcr = p_oggpacket->granulepos * I64C(1000000)
+            p_stream->i_pcr = p_oggpacket->granulepos * INT64_C(1000000)
                               / p_stream->f_rate;
         }
         else
@@ -455,7 +455,7 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
             ogg_int64_t pframe = p_oggpacket->granulepos -
               ( iframe << p_stream->i_theora_keyframe_granule_shift );
 
-            p_stream->i_pcr = ( iframe + pframe ) * I64C(1000000)
+            p_stream->i_pcr = ( iframe + pframe ) * INT64_C(1000000)
                               / p_stream->f_rate;
         }
 
@@ -469,10 +469,10 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
          * If we can't then don't touch the old value. */
         if( p_stream->fmt.i_cat == VIDEO_ES )
             /* 1 frame per packet */
-            p_stream->i_interpolated_pcr += (I64C(1000000) / p_stream->f_rate);
+            p_stream->i_interpolated_pcr += (INT64_C(1000000) / p_stream->f_rate);
         else if( p_stream->fmt.i_bitrate )
             p_stream->i_interpolated_pcr +=
-                ( p_oggpacket->bytes * I64C(1000000) /
+                ( p_oggpacket->bytes * INT64_C(1000000) /
                   p_stream->fmt.i_bitrate / 8 );
     }
 }
index ea82a3bf69b4d9aa701b7af918941a2f4fae8380..b1846062f1a417ae85d42fc0f7a1a8c52532938f 100644 (file)
@@ -143,7 +143,7 @@ static int Demux( demux_t *p_demux )
                 psz_parse += sizeof("EXTINF:") - 1;
                 parseEXTINF( psz_parse, &psz_artist, &psz_name, &i_parsed_duration );
                 if( i_parsed_duration >= 0 )
-                    i_duration = i_parsed_duration * I64C(1000000);
+                    i_duration = i_parsed_duration * INT64_C(1000000);
                 if( psz_name )
                     psz_name = strdup( psz_name );
                 if( psz_artist )
index 8a2d25cc97a5878a786e95d2ae1906714dea1a14..6943e617db11ff3350ec61a61cfc976fb58f8ccb 100644 (file)
@@ -327,7 +327,7 @@ static int Demux( demux_t *p_demux )
 
     if( !p_sys->b_hurry_up )
     {
-        p_sys->i_pcr += ( I64C(1000000) / p_sys->f_rate );
+        p_sys->i_pcr += ( INT64_C(1000000) / p_sys->f_rate );
     }
 
     return 1;
index 3183bdc0f08564ab844767f84068740bfb47f09f..023a0badb4416e5271434ea85a9bd5baad4f5f99 100644 (file)
@@ -380,7 +380,7 @@ static int Demux( demux_t *p_demux )
     p_block->i_dts = p_block->i_pts = p_sys->i_pcr;
     es_out_Send( p_demux->out, p_sys->p_es_video, p_block );
 
-    p_sys->i_pcr += ( I64C(1000000) / p_sys->f_fps );
+    p_sys->i_pcr += ( INT64_C(1000000) / p_sys->f_fps );
 
     return 1;
 }
index 8e84154a9951516f9bf57465ba98a3677fd6f84a..8fa2461d9d5c40898e7d4f1bb0005daf24008dbf 100644 (file)
@@ -1190,9 +1190,9 @@ static int DVBEventInformation( demux_t *p_demux, int64_t *pi_time, int64_t *pi_
         if( p_sys->i_dvb_start <= t && t < p_sys->i_dvb_start + p_sys->i_dvb_length )
         {
             if( pi_length )
-                *pi_length = p_sys->i_dvb_length * I64C(1000000);
+                *pi_length = p_sys->i_dvb_length * INT64_C(1000000);
             if( pi_time )
-                *pi_time   = (t - p_sys->i_dvb_start) * I64C(1000000);
+                *pi_time   = (t - p_sys->i_dvb_start) * INT64_C(1000000);
             return VLC_SUCCESS;
         }
     }
@@ -1255,7 +1255,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             pi64 = (int64_t*)va_arg( args, int64_t * );
             if( p_sys->i_mux_rate > 0 )
             {
-                *pi64 = I64C(1000000) * ( stream_Size( p_demux->s ) / 50 ) /
+                *pi64 = INT64_C(1000000) * ( stream_Size( p_demux->s ) / 50 ) /
                         p_sys->i_mux_rate;
                 return VLC_SUCCESS;
             }
index db999ccd23a5b305fd9b89bbdb1f537cdd3d628d..c2ea549b37d092b9f22d8942ed442b41f25d37a0 100644 (file)
@@ -194,7 +194,7 @@ static int Demux( demux_t *p_demux )
 
     p_data = stream_Block( p_demux->s, p_sys->pi_seektable[p_sys->i_currentframe] );
     if( p_data == NULL ) return 0;
-    p_data->i_dts = p_data->i_pts = (int64_t)(1 + I64C(1000000) * p_sys->i_currentframe) * TTA_FRAMETIME;
+    p_data->i_dts = p_data->i_pts = (int64_t)(1 + INT64_C(1000000) * p_sys->i_currentframe) * TTA_FRAMETIME;
 
     p_sys->i_currentframe++;
 
@@ -248,12 +248,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_GET_LENGTH:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            *pi64 = I64C(1000000) * p_sys->i_totalframes * TTA_FRAMETIME;
+            *pi64 = INT64_C(1000000) * p_sys->i_totalframes * TTA_FRAMETIME;
             return VLC_SUCCESS;
 
         case DEMUX_GET_TIME:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            *pi64 = I64C(1000000) * p_sys->i_currentframe * TTA_FRAMETIME;
+            *pi64 = INT64_C(1000000) * p_sys->i_currentframe * TTA_FRAMETIME;
             return VLC_SUCCESS;
 
         default:
index 750c8f47f7724bc79418de3a362cce3c3791de2a..05d044218c59f128dfb7699351de655e0cded54d 100644 (file)
@@ -166,13 +166,13 @@ static int Demux( demux_t *p_demux)
 
             if( p_sys->p_packetizer->fmt_out.video.i_frame_rate > 0 &&
                 p_sys->p_packetizer->fmt_out.video.i_frame_rate_base > 0 )
-                p_sys->i_dts += I64C(1000000) *
+                p_sys->i_dts += INT64_C(1000000) *
                     p_sys->p_packetizer->fmt_out.video.i_frame_rate_base /
                     p_sys->p_packetizer->fmt_out.video.i_frame_rate;
             else if( p_sys->f_fps > 0.001 )
                 p_sys->i_dts += (int64_t)((double)1000000.0 / p_sys->f_fps);
             else
-                p_sys->i_dts += I64C(1000000) / 25;
+                p_sys->i_dts += INT64_C(1000000) / 25;
         }
     }
     return 1;
index 07d92328b34f06799e7d6fc4bfba6436585dc7c0..70d046b4be6ee6c4cbe31f4ffbb5440b9d989328 100644 (file)
@@ -564,7 +564,7 @@ void E_(GtkDisplayDate)( GtkAdjustment *p_adj, gpointer userdata )
         char psz_time[ MSTRTIME_MAX_SIZE ];
         int64_t i_seconds;
 
-        i_seconds = var_GetTime( p_intf->p_sys->p_input, "time" ) / I64C(1000000 );
+        i_seconds = var_GetTime( p_intf->p_sys->p_input, "time" ) / INT64_C(1000000 );
         secstotimestr( psz_time, i_seconds );
 
         gtk_label_set_text( GTK_LABEL( p_intf->p_sys->p_slider_label ),
index d990fa1c729e18a202d8b62c891617423d8c6103..13e8aad20e112111e01094ab948af24fe7a7e3b2 100644 (file)
@@ -760,10 +760,10 @@ void Interface::OnSliderUpdate( int wp )
             char psz_time[ MSTRTIME_MAX_SIZE ], psz_total[ MSTRTIME_MAX_SIZE ];
             mtime_t i_seconds;
 
-            i_seconds = var_GetTime( p_input, "length" ) / I64C(1000000 );
+            i_seconds = var_GetTime( p_input, "length" ) / INT64_C(1000000 );
             secstotimestr( psz_total, i_seconds );
 
-            i_seconds = var_GetTime( p_input, "time" ) / I64C(1000000 );
+            i_seconds = var_GetTime( p_input, "time" ) / INT64_C(1000000 );
             secstotimestr( psz_time, i_seconds );
 
             SendMessage( hwndLabel, WM_SETTEXT, (WPARAM)1,
index 17a411bff0521d3f5d11d866d04ddd6ec24a2d85..e9dc6387bb41b4b07ccf3db6861510e1ce80da24 100644 (file)
@@ -530,7 +530,7 @@ again:
                 block_t *p_next = block_FifoShow( p_input->p_fifo );
                 int64_t       i_diff  = p_next->i_dts - p_data->i_dts;
 
-                if( i_diff < I64C(1000000 ) )   /* protection */
+                if( i_diff < INT64_C(1000000 ) )   /* protection */
                 {
                     p_data->i_length = i_diff;
                 }
@@ -740,14 +740,14 @@ static bo_t *GetESDS( mp4_stream_t *p_stream )
         i_bitrate_avg += p_stream->entry[i].i_size;
         if( p_stream->entry[i].i_length > 0)
         {
-            int64_t i_bitrate = I64C(8000000) * p_stream->entry[i].i_size / p_stream->entry[i].i_length;
+            int64_t i_bitrate = INT64_C(8000000) * p_stream->entry[i].i_size / p_stream->entry[i].i_length;
             if( i_bitrate > i_bitrate_max )
                 i_bitrate_max = i_bitrate;
         }
     }
 
     if( p_stream->i_duration > 0 )
-        i_bitrate_avg = I64C(8000000) * i_bitrate_avg / p_stream->i_duration;
+        i_bitrate_avg = INT64_C(8000000) * i_bitrate_avg / p_stream->i_duration;
     else
         i_bitrate_avg = 0;
     if( i_bitrate_max <= 1 )
@@ -1448,13 +1448,13 @@ static bo_t *GetStblBox( sout_mux_t *p_mux, mp4_stream_t *p_stream )
     /* first, create quantified length */
     for( i = 0, i_dts = 0, i_dts_q = 0; i < p_stream->i_entry_count; i++ )
     {
-        int64_t i_dts_deq = i_dts_q * I64C(1000000) / (int64_t)i_timescale;
+        int64_t i_dts_deq = i_dts_q * INT64_C(1000000) / (int64_t)i_timescale;
         int64_t i_delta = p_stream->entry[i].i_length + i_dts - i_dts_deq;
 
         i_dts += p_stream->entry[i].i_length;
 
         p_stream->entry[i].i_length =
-            i_delta * (int64_t)i_timescale / I64C(1000000);
+            i_delta * (int64_t)i_timescale / INT64_C(1000000);
 
         i_dts_q += p_stream->entry[i].i_length;
     }
@@ -1715,13 +1715,13 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
             if( p_sys->b_64_ext )
             {
                 bo_add_64be( elst, (p_stream->i_dts_start-p_sys->i_dts_start) *
-                             i_movie_timescale / I64C(1000000) );
+                             i_movie_timescale / INT64_C(1000000) );
                 bo_add_64be( elst, -1 );
             }
             else
             {
                 bo_add_32be( elst, (p_stream->i_dts_start-p_sys->i_dts_start) *
-                             i_movie_timescale / I64C(1000000) );
+                             i_movie_timescale / INT64_C(1000000) );
                 bo_add_32be( elst, -1 );
             }
             bo_add_16be( elst, 1 );
@@ -1734,13 +1734,13 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
         if( p_sys->b_64_ext )
         {
             bo_add_64be( elst, p_stream->i_duration *
-                         i_movie_timescale / I64C(1000000) );
+                         i_movie_timescale / INT64_C(1000000) );
             bo_add_64be( elst, 0 );
         }
         else
         {
             bo_add_32be( elst, p_stream->i_duration *
-                         i_movie_timescale / I64C(1000000) );
+                         i_movie_timescale / INT64_C(1000000) );
             bo_add_32be( elst, 0 );
         }
         bo_add_16be( elst, 1 );
index cac4d72580eed5a86776219c515f7a229e0f3e13..02f27602c9fd6603380001260d752d92921cd882 100644 (file)
@@ -1380,11 +1380,11 @@ static int Mux( sout_mux_t *p_mux )
                                 p_spu->i_dts - p_pcr_stream->i_pes_dts;
 
                             if( ( i_spu_delay > i_shaping_delay ) &&
-                                ( i_spu_delay < I64C(100000000) ) )
+                                ( i_spu_delay < INT64_C(100000000) ) )
                                 continue;
 
-                            if ( ( i_spu_delay >= I64C(100000000) ) ||
-                                 ( i_spu_delay < I64C(10000) ) )
+                            if ( ( i_spu_delay >= INT64_C(100000000) ) ||
+                                 ( i_spu_delay < INT64_C(10000) ) )
                             {
                                 BufferChainClean( &p_stream->chain_pes );
                                 p_stream->i_pes_dts = 0;
index 6737e74d925650fcedf89418a70ea9a0ca213911..bcdc13103cb3c85ab46d751ec7efd0ebf2f1839a 100644 (file)
@@ -369,7 +369,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
             SetDWLE( &p_stream->p_oggds_header->i_size,
                      sizeof( oggds_header_t ) - 1 );
             SetQWLE( &p_stream->p_oggds_header->i_time_unit,
-                     I64C(10000000) * p_input->p_fmt->video.i_frame_rate_base /
+                     INT64_C(10000000) * p_input->p_fmt->video.i_frame_rate_base /
                      (int64_t)p_input->p_fmt->video.i_frame_rate );
             SetQWLE( &p_stream->p_oggds_header->i_samples_per_unit, 1 );
             SetDWLE( &p_stream->p_oggds_header->i_default_len, 1 ); /* ??? */
@@ -434,7 +434,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
             memset( p_stream->p_oggds_header->sub_type, 0, 4 );
             sprintf( p_stream->p_oggds_header->sub_type, "%-x", i_tag );
 
-            SetQWLE( &p_stream->p_oggds_header->i_time_unit, I64C(10000000) );
+            SetQWLE( &p_stream->p_oggds_header->i_time_unit, INT64_C(10000000) );
             SetDWLE( &p_stream->p_oggds_header->i_default_len, 1 );
             SetDWLE( &p_stream->p_oggds_header->i_buffer_size, 30*1024 );
             SetQWLE( &p_stream->p_oggds_header->i_samples_per_unit,
@@ -952,13 +952,13 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
             /* number of sample from begining + current packet */
             op.granulepos =
                 ( p_data->i_dts - p_sys->i_start_dts + p_data->i_length ) *
-                (mtime_t)p_input->p_fmt->audio.i_rate / I64C(1000000);
+                (mtime_t)p_input->p_fmt->audio.i_rate / INT64_C(1000000);
         }
         else if( p_stream->p_oggds_header )
         {
             /* number of sample from begining */
             op.granulepos = ( p_data->i_dts - p_sys->i_start_dts ) *
-                p_stream->p_oggds_header->i_samples_per_unit / I64C(1000000);
+                p_stream->p_oggds_header->i_samples_per_unit / INT64_C(1000000);
         }
     }
     else if( p_stream->i_cat == VIDEO_ES )
@@ -969,10 +969,10 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
             op.granulepos = ( ( p_data->i_dts - p_sys->i_start_dts ) *
                 p_input->p_fmt->video.i_frame_rate /
                 p_input->p_fmt->video.i_frame_rate_base /
-                I64C(1000000) ) << p_stream->i_keyframe_granule_shift;
+                INT64_C(1000000) ) << p_stream->i_keyframe_granule_shift;
         }
         else if( p_stream->p_oggds_header )
-            op.granulepos = ( p_data->i_dts - p_sys->i_start_dts ) * I64C(10) /
+            op.granulepos = ( p_data->i_dts - p_sys->i_start_dts ) * INT64_C(10) /
                 p_stream->p_oggds_header->i_time_unit;
     }
     else if( p_stream->i_cat == SPU_ES )
index 7928d495be1277ec661ad110e49052124ee22f46..56077975abc3e6800d45b1000ceab173da55eef0 100644 (file)
@@ -569,14 +569,14 @@ static int ParseVOP( decoder_t *p_dec, block_t *p_vop )
         p_dec->fmt_in.video.i_frame_rate > 0 &&
         p_dec->fmt_in.video.i_frame_rate_base > 0 )
     {
-        p_sys->i_interpolated_pts += I64C(1000000) *
+        p_sys->i_interpolated_pts += INT64_C(1000000) *
         p_dec->fmt_in.video.i_frame_rate_base *
         p_vop->i_rate / INPUT_RATE_DEFAULT /
         p_dec->fmt_in.video.i_frame_rate;
     }
     else if( p_dec->p_sys->i_fps_num )
         p_sys->i_interpolated_pts +=
-            ( I64C(1000000) * (i_time_ref + i_time_increment -
+            ( INT64_C(1000000) * (i_time_ref + i_time_increment -
               p_sys->i_last_time - p_sys->i_last_timeincr) *
               p_vop->i_rate / INPUT_RATE_DEFAULT /
               p_dec->p_sys->i_fps_num );
index de44056a79efe87524e70afb176f1f112ff5035c..533b61e309876eece163a098412b21662e89d7e9 100644 (file)
@@ -377,7 +377,7 @@ static block_t *ParseIDU( decoder_t *p_dec, block_t *p_frag )
             if( p_pic->i_dts <= 0 )
                 p_pic->i_dts = p_sys->i_interpolated_dts;
 
-            p_sys->i_interpolated_dts += I64C(1000000) * p_dec->fmt_out.video.i_frame_rate_base / p_dec->fmt_out.video.i_frame_rate;
+            p_sys->i_interpolated_dts += INT64_C(1000000) * p_dec->fmt_out.video.i_frame_rate_base / p_dec->fmt_out.video.i_frame_rate;
             if( p_pic->i_pts <= 0 )
             {
                 if( !p_sys->sh.b_has_bframe || (p_pic->i_flags & BLOCK_FLAG_TYPE_B ) )
index d1de7a7d7834a92e08c1c827d07dc308955420b1..b0f6dd0ee0d76d6201076fa8570e16d820c4cfdd 100644 (file)
@@ -1512,7 +1512,7 @@ unsigned rtp_get_num( const sout_stream_id_t *id )
 void rtp_packetize_common( sout_stream_id_t *id, block_t *out,
                            int b_marker, int64_t i_pts )
 {
-    uint32_t i_timestamp = i_pts * (int64_t)id->i_clock_rate / I64C(1000000);
+    uint32_t i_timestamp = i_pts * (int64_t)id->i_clock_rate / INT64_C(1000000);
 
     out->p_buffer[0] = 0x80;
     out->p_buffer[1] = (b_marker?0x80:0x00)|id->i_payload_type;
index 01071c60666f78b389daada264b82efb96987ae3..7945473338ca018f8c4ae7c77077043cb8cf6a34 100644 (file)
@@ -127,7 +127,7 @@ DWORD CAtmoExternalCaptureInput::Execute(void)
     vlc_mutex_lock( &m_WakeupLock );
 
     while ((this->m_bTerminated == ATMO_FALSE) && (this->m_pAtmoThread->b_die == false)) {
-          int value = vlc_cond_timedwait(&m_WakeupCond, &m_WakeupLock, mdate() + I64C(75000));
+          int value = vlc_cond_timedwait(&m_WakeupCond, &m_WakeupLock, mdate() + INT64_C(75000));
           if(!value) {
              /* DeliverNewSourceDataPaket delivered new work for me... get it! */
              CalcColors(); // read picture and calculate colors
index c7992980295945da926638222e4967f73d5561da..1e8d55b836a08096910ce031c66a2958ece875a8 100644 (file)
@@ -1285,7 +1285,7 @@ static inline void XDeint8x8MergeMMXEXT( uint8_t *dst, int i_dst,
                                          uint8_t *src1, int i_src1,
                                          uint8_t *src2, int i_src2 )
 {
-    static const uint64_t m_4 = I64C(0x0004000400040004);
+    static const uint64_t m_4 = INT64_C(0x0004000400040004);
     int y, x;
 
     /* Progressive */
index f2e75cc54022164ec527ede53eca943a18d9702e..dd1ac06c074a413dba7e1d39430fa3649b9b32df 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "mosaic.h"
 
-#define BLANK_DELAY I64C(1000000)
+#define BLANK_DELAY INT64_C(1000000)
 
 /*****************************************************************************
  * Local prototypes
index 8c5e3c20b0de3ed06a0478e7b8a11a413925f525..9d554ca8b6dd6f87583192bcc01f74d875be7e5e 100644 (file)
@@ -764,7 +764,7 @@ bool vlc_ureduce( unsigned *pi_dst_nom, unsigned *pi_dst_den,
     i_nom /= i_gcd;
     i_den /= i_gcd;
 
-    if( i_max == 0 ) i_max = I64C(0xFFFFFFFF);
+    if( i_max == 0 ) i_max = INT64_C(0xFFFFFFFF);
 
     if( i_nom > i_max || i_den > i_max )
     {
index 6c724b82d7effdd654203c6c4479ebe65f954e09..ce3b6d0ce3708d73c6b13334fd3a19799a2fac6c 100644 (file)
@@ -75,7 +75,7 @@ static void ClockNewRef( input_clock_t * p_pgrm,
  *****************************************************************************/
 
 /* Maximum gap allowed between two CRs. */
-#define CR_MAX_GAP (I64C(2000000)*100/9)
+#define CR_MAX_GAP (INT64_C(2000000)*100/9)
 
 /* Latency introduced on DVDs with CR == 0 on chapter change - this is from
  * my dice --Meuuh */
index 3a47e70729eb1efca47530d5de661d078a330427..6116346c1c80a07ce8950539ce3f067b14adc1c2 100644 (file)
@@ -219,7 +219,7 @@ int demux_vaControlHelper( stream_t *s,
             pi64 = (int64_t*)va_arg( args, int64_t * );
             if( i_bitrate > 0 && i_end > i_start )
             {
-                *pi64 = I64C(8000000) * (i_end - i_start) / i_bitrate;
+                *pi64 = INT64_C(8000000) * (i_end - i_start) / i_bitrate;
                 return VLC_SUCCESS;
             }
             return VLC_EGENERIC;
@@ -228,7 +228,7 @@ int demux_vaControlHelper( stream_t *s,
             pi64 = (int64_t*)va_arg( args, int64_t * );
             if( i_bitrate > 0 && i_end > i_start )
             {
-                *pi64 = I64C(8000000) * (i_tell - i_start) / i_bitrate;
+                *pi64 = INT64_C(8000000) * (i_tell - i_start) / i_bitrate;
                 return VLC_SUCCESS;
             }
             return VLC_EGENERIC;
@@ -262,7 +262,7 @@ int demux_vaControlHelper( stream_t *s,
             i64 = (int64_t)va_arg( args, int64_t );
             if( i_bitrate > 0 && i64 >= 0 )
             {
-                int64_t i_block = i64 * i_bitrate / I64C(8000000) / i_align;
+                int64_t i_block = i64 * i_bitrate / INT64_C(8000000) / i_align;
                 if( stream_Seek( s, i_start + i_block * i_align ) )
                 {
                     return VLC_EGENERIC;
index 6433bd67d710dc64af2341b5db286503a4799876..687ec79fef3df1b0b67be3bdb1badfb843e288df 100644 (file)
@@ -772,7 +772,7 @@ static void MainLoop( input_thread_t *p_input )
             }
 
             var_SetBool( p_input, "intf-change", true );
-            i_intf_update = mdate() + I64C(150000);
+            i_intf_update = mdate() + INT64_C(150000);
         }
         /* 150ms * 8 = ~ 1 second */
         if( ++i_updates % 8 == 0 )
@@ -952,9 +952,9 @@ static void StartTitle( input_thread_t * p_input )
 
     /* Start time*/
     /* Set start time */
-    p_input->p->i_start = I64C(1000000) * var_GetInteger( p_input, "start-time" );
-    p_input->p->i_stop  = I64C(1000000) * var_GetInteger( p_input, "stop-time" );
-    p_input->p->i_run   = I64C(1000000) * var_GetInteger( p_input, "run-time" );
+    p_input->p->i_start = INT64_C(1000000) * var_GetInteger( p_input, "start-time" );
+    p_input->p->i_stop  = INT64_C(1000000) * var_GetInteger( p_input, "stop-time" );
+    p_input->p->i_run   = INT64_C(1000000) * var_GetInteger( p_input, "run-time" );
     i_length = var_GetTime( p_input, "length" );
     if( p_input->p->i_run < 0 )
     {
@@ -973,7 +973,7 @@ static void StartTitle( input_thread_t * p_input )
             vlc_value_t s;
 
             msg_Dbg( p_input, "starting at time: %ds",
-                              (int)( p_input->p->i_start / I64C(1000000) ) );
+                              (int)( p_input->p->i_start / INT64_C(1000000) ) );
 
             s.i_time = p_input->p->i_start;
             input_ControlPush( p_input, INPUT_CONTROL_SET_TIME, &s );
index 7c32f11705815e2cc962b547ce9f879670c58295..f0cf57a1b1e11a15e5c8ce2675ad09d77499d56b 100644 (file)
@@ -631,13 +631,13 @@ static void AStreamPrebufferBlock( stream_t *s )
             /* Update stat */
             p_sys->stat.i_bytes = p_sys->block.i_size;
             p_sys->stat.i_read_time = i_date - i_start;
-            i_byterate = ( I64C(1000000) * p_sys->stat.i_bytes ) /
+            i_byterate = ( INT64_C(1000000) * p_sys->stat.i_bytes ) /
                          (p_sys->stat.i_read_time + 1);
 
             msg_Dbg( s, "prebuffering done %"PRId64" bytes in %"PRId64"s - "
                      "%"PRId64" kbytes/s",
                      p_sys->stat.i_bytes,
-                     p_sys->stat.i_read_time / I64C(1000000),
+                     p_sys->stat.i_read_time / INT64_C(1000000),
                      i_byterate / 1024 );
             break;
         }
@@ -1376,13 +1376,13 @@ static void AStreamPrebufferStream( stream_t *s )
             /* Update stat */
             p_sys->stat.i_bytes = tk->i_end - tk->i_start;
             p_sys->stat.i_read_time = i_date - i_start;
-            i_byterate = ( I64C(1000000) * p_sys->stat.i_bytes ) /
+            i_byterate = ( INT64_C(1000000) * p_sys->stat.i_bytes ) /
                          (p_sys->stat.i_read_time+1);
 
             msg_Dbg( s, "pre-buffering done %"PRId64" bytes in %"PRId64"s - "
                      "%"PRId64" kbytes/s",
                      p_sys->stat.i_bytes,
-                     p_sys->stat.i_read_time / I64C(1000000),
+                     p_sys->stat.i_read_time / INT64_C(1000000),
                      i_byterate / 1024 );
             break;
         }
index dfd6d73775a11bb8425e5c791753477fe4372bf9..c2c19151cbfe651aedb26bea9d231da20fa701e3 100644 (file)
@@ -190,9 +190,9 @@ mtime_t mdate( void )
 
 #elif defined( WIN32 ) || defined( UNDER_CE )
     /* We don't need the real date, just the value of a high precision timer */
-    static mtime_t freq = I64C(-1);
+    static mtime_t freq = INT64_C(-1);
 
-    if( freq == I64C(-1) )
+    if( freq == INT64_C(-1) )
     {
         /* Extract from the Tcl source code:
          * (http://www.cs.man.ac.uk/fellowsd-bin/TIP/7.html)
@@ -215,7 +215,7 @@ mtime_t mdate( void )
         LARGE_INTEGER buf;
 
         freq = ( QueryPerformanceFrequency( &buf ) &&
-                 (buf.QuadPart == I64C(1193182) || buf.QuadPart == I64C(3579545) ) )
+                 (buf.QuadPart == INT64_C(1193182) || buf.QuadPart == INT64_C(3579545) ) )
                ? buf.QuadPart : 0;
 
 #if defined( WIN32 )
@@ -262,16 +262,16 @@ mtime_t mdate( void )
          * about 49.7 days so we try to detect the wrapping. */
 
         static CRITICAL_SECTION date_lock;
-        static mtime_t i_previous_time = I64C(-1);
+        static mtime_t i_previous_time = INT64_C(-1);
         static int i_wrap_counts = -1;
 
         if( i_wrap_counts == -1 )
         {
             /* Initialization */
 #if defined( WIN32 )
-            i_previous_time = I64C(1000) * timeGetTime();
+            i_previous_time = INT64_C(1000) * timeGetTime();
 #else
-            i_previous_time = I64C(1000) * GetTickCount();
+            i_previous_time = INT64_C(1000) * GetTickCount();
 #endif
             InitializeCriticalSection( &date_lock );
             i_wrap_counts = 0;
@@ -279,17 +279,17 @@ mtime_t mdate( void )
 
         EnterCriticalSection( &date_lock );
 #if defined( WIN32 )
-        res = I64C(1000) *
-            (i_wrap_counts * I64C(0x100000000) + timeGetTime());
+        res = INT64_C(1000) *
+            (i_wrap_counts * INT64_C(0x100000000) + timeGetTime());
 #else
-        res = I64C(1000) *
-            (i_wrap_counts * I64C(0x100000000) + GetTickCount());
+        res = INT64_C(1000) *
+            (i_wrap_counts * INT64_C(0x100000000) + GetTickCount());
 #endif
         if( i_previous_time > res )
         {
             /* Counter wrapped */
             i_wrap_counts++;
-            res += I64C(0x100000000) * 1000;
+            res += INT64_C(0x100000000) * 1000;
         }
         i_previous_time = res;
         LeaveCriticalSection( &date_lock );
index dad2c141d2f4d2cbc3b5d7feb1a4aa2ecff2fa29..d96882b410494e3a2eff8d371a9e68bc86fad1e1 100644 (file)
@@ -1399,7 +1399,7 @@ static void httpd_ClientInit( httpd_client_t *cl, mtime_t now )
 {
     cl->i_state = HTTPD_CLIENT_RECEIVING;
     cl->i_activity_date = now;
-    cl->i_activity_timeout = I64C(10000000);
+    cl->i_activity_timeout = INT64_C(10000000);
     cl->i_buffer_size = HTTPD_CL_BUFSIZE;
     cl->i_buffer = 0;
     cl->p_buffer = malloc( cl->i_buffer_size );
index 4a49351845cb3bc389d4d9057b7f32eb9a38dc69..8f4a76a1b7f29dae12c53a7f783e8a3893788a92 100644 (file)
@@ -601,7 +601,7 @@ void sout_MuxSendBuffer( sout_mux_t *p_mux, sout_input_t *p_input,
 
     if( p_mux->b_waiting_stream )
     {
-        const int64_t i_caching = var_GetInteger( p_mux->p_sout, "sout-mux-caching" ) * I64C(1000);
+        const int64_t i_caching = var_GetInteger( p_mux->p_sout, "sout-mux-caching" ) * INT64_C(1000);
 
         if( p_mux->i_add_stream_start < 0 )
             p_mux->i_add_stream_start = p_buffer->i_dts;