Commit 97897eee authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

NIH syndrome cure (2)

parent f0c83daa
......@@ -1728,7 +1728,7 @@ static int Demux( demux_t *p_demux )
i_pts /= 10; /* Dshow works with 100 nano-seconds resolution */
#if 0
msg_Dbg( p_demux, "Read() stream: %i, size: %i, PTS: "I64Fd,
msg_Dbg( p_demux, "Read() stream: %i, size: %i, PTS: %"PRId64,
i_stream, i_data_size, i_pts );
#endif
......
......@@ -731,11 +731,11 @@ static int Demux( demux_t *p_demux )
msg_Dbg( p_demux, "DVDNAV_CELL_CHANGE" );
msg_Dbg( p_demux, " - cellN=%d", event->cellN );
msg_Dbg( p_demux, " - pgN=%d", event->pgN );
msg_Dbg( p_demux, " - cell_length="I64Fd, event->cell_length );
msg_Dbg( p_demux, " - pg_length="I64Fd, event->pg_length );
msg_Dbg( p_demux, " - pgc_length="I64Fd, event->pgc_length );
msg_Dbg( p_demux, " - cell_start="I64Fd, event->cell_start );
msg_Dbg( p_demux, " - pg_start="I64Fd, event->pg_start );
msg_Dbg( p_demux, " - cell_length=%"PRId64, event->cell_length );
msg_Dbg( p_demux, " - pg_length=%"PRId64, event->pg_length );
msg_Dbg( p_demux, " - pgc_length=%"PRId64, event->pgc_length );
msg_Dbg( p_demux, " - cell_start=%"PRId64, event->cell_start );
msg_Dbg( p_demux, " - pg_start=%"PRId64, event->pg_start );
/* Store the lenght in time of the current PGC */
p_sys->i_pgc_length = event->pgc_length / 90 * 1000;
......
......@@ -334,7 +334,7 @@ static int InOpen( vlc_object_t *p_this )
}
p_access->info.i_size = atoll( &psz_arg[4] );
free( psz_arg );
msg_Dbg( p_access, "file size: "I64Fd, p_access->info.i_size );
msg_Dbg( p_access, "file size: %"PRId64, p_access->info.i_size );
/* Start the 'stream' */
if( ftp_StartStream( p_this, p_sys, 0 ) < 0 )
......@@ -436,7 +436,7 @@ static int _Seek( vlc_object_t *p_access, access_sys_t *p_sys, int64_t i_pos )
if( i_pos < 0 )
return VLC_EGENERIC;
msg_Dbg( p_access, "seeking to "I64Fd, i_pos );
msg_Dbg( p_access, "seeking to %"PRId64, i_pos );
ftp_StopStream( (vlc_object_t *)p_access, p_sys );
if( ftp_StartStream( (vlc_object_t *)p_access, p_sys, i_pos ) < 0 )
......@@ -734,7 +734,7 @@ static int ftp_StartStream( vlc_object_t *p_access, access_sys_t *p_sys,
if( i_start > 0 )
{
if( ftp_SendCommand( p_access, p_sys, "REST "I64Fu, i_start ) < 0 ||
if( ftp_SendCommand( p_access, p_sys, "REST %"PRIu64, i_start ) < 0 ||
ftp_ReadCommand( p_access, p_sys, &i_answer, NULL ) > 3 )
{
msg_Err( p_access, "cannot set restart offset" );
......
......@@ -808,7 +808,7 @@ static ssize_t ReadCompressed( access_t *p_access, uint8_t *p_buffer,
*****************************************************************************/
static int Seek( access_t *p_access, int64_t i_pos )
{
msg_Dbg( p_access, "trying to seek to "I64Fd, i_pos );
msg_Dbg( p_access, "trying to seek to %"PRId64, i_pos );
Disconnect( p_access );
......@@ -1072,7 +1072,7 @@ static int Request( access_t *p_access, int64_t i_tell )
if( p_sys->i_version == 1 )
{
net_Printf( VLC_OBJECT(p_access), p_sys->fd, pvs,
"Range: bytes="I64Fd"-\r\n", i_tell );
"Range: bytes=%"PRId64"-\r\n", i_tell );
}
/* Cookies */
......@@ -1222,7 +1222,7 @@ static int Request( access_t *p_access, int64_t i_tell )
else
{
p_access->info.i_size = i_tell + atoll( p );
msg_Dbg( p_access, "stream size="I64Fd, p_access->info.i_size );
msg_Dbg( p_access, "stream size=%"PRId64, p_access->info.i_size );
}
}
else if( !strcasecmp( psz, "Location" ) )
......
......@@ -310,7 +310,7 @@ static int Seek( access_t *p_access, int64_t i_pos )
off_t i_offset;
off_t i_packet;
msg_Dbg( p_access, "seeking to "I64Fd, i_pos );
msg_Dbg( p_access, "seeking to %"PRId64, i_pos );
i_packet = ( i_pos - p_sys->i_header ) / p_sys->asfh.i_min_data_packet_size;
i_offset = ( i_pos - p_sys->i_header ) % p_sys->asfh.i_min_data_packet_size;
......@@ -474,7 +474,7 @@ static int Reset( access_t *p_access )
E_( asf_HeaderParse )( &p_sys->asfh,
p_sys->p_header, p_sys->i_header );
msg_Dbg( p_access, "packet count="I64Fd" packet size=%d",
msg_Dbg( p_access, "packet count=%"PRId64" packet size=%d",
p_sys->asfh.i_data_packets_count,
p_sys->asfh.i_min_data_packet_size );
......@@ -705,7 +705,7 @@ static int Describe( access_t *p_access, char **ppsz_location )
* and bitrate mutual exclusion(optional) */
E_( asf_HeaderParse )( &p_sys->asfh,
p_sys->p_header, p_sys->i_header );
msg_Dbg( p_access, "packet count="I64Fd" packet size=%d",
msg_Dbg( p_access, "packet count=%"PRId64" packet size=%d",
p_sys->asfh.i_data_packets_count,
p_sys->asfh.i_min_data_packet_size );
......
......@@ -324,7 +324,7 @@ static int Seek( access_t * p_access, int64_t i_pos )
i_packet = ( i_pos - p_sys->i_header ) / p_sys->i_packet_length;
i_offset = ( i_pos - p_sys->i_header ) % p_sys->i_packet_length;
}
msg_Dbg( p_access, "seeking to "I64Fd " (packet:%d)", i_pos, i_packet );
msg_Dbg( p_access, "seeking to %"PRId64 " (packet:%d)", i_pos, i_packet );
MMSStop( p_access );
msg_Dbg( p_access, "stream stopped (seek)" );
......
......@@ -330,7 +330,7 @@ static int Seek( access_t *p_access, int64_t i_pos )
if( i_pos < 0 ) return VLC_EGENERIC;
msg_Dbg( p_access, "seeking to "I64Fd, i_pos );
msg_Dbg( p_access, "seeking to %"PRId64, i_pos );
#ifdef USE_CTX
i_ret = p_sys->p_smb->lseek(p_sys->p_smb, p_sys->p_file, i_pos, SEEK_SET);
......
......@@ -335,7 +335,7 @@ static void Dump( access_t *p_access, uint8_t *p_buffer, int i_buffer )
{
if( p_sys->f )
{
msg_Dbg( p_access, "dumped "I64Fd" kb (%s)",
msg_Dbg( p_access, "dumped %"PRId64" kb (%s)",
p_sys->i_size/1024, p_sys->psz_file );
Notify( p_access, false );
......
......@@ -350,7 +350,7 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
{
if( p_sys->p_buffer->i_dts + p_sys->p_thread->i_caching < now )
{
msg_Dbg( p_access, "late packet for UDP input (" I64Fd ")",
msg_Dbg( p_access, "late packet for UDP input (%"PRId64 ")",
now - p_sys->p_buffer->i_dts
- p_sys->p_thread->i_caching );
}
......@@ -391,7 +391,7 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
/* Flush */
if( p_sys->p_buffer->i_dts + p_sys->p_thread->i_caching < now )
{
msg_Dbg( p_access, "late packet for udp input (" I64Fd ")",
msg_Dbg( p_access, "late packet for udp input (%"PRId64 ")",
mdate() - p_sys->p_buffer->i_dts
- p_sys->p_thread->i_caching );
}
......@@ -484,7 +484,7 @@ static void ThreadWrite( vlc_object_t *p_this )
if( i_date - i_date_last > 2000000 )
{
if( !i_dropped_packets )
msg_Dbg( p_thread, "mmh, hole ("I64Fd" > 2s) -> drop",
msg_Dbg( p_thread, "mmh, hole (%"PRId64" > 2s) -> drop",
i_date - i_date_last );
block_FifoPut( p_thread->p_empty_blocks, p_pk );
......@@ -496,7 +496,7 @@ static void ThreadWrite( vlc_object_t *p_this )
else if( i_date - i_date_last < -1000 )
{
if( !i_dropped_packets )
msg_Dbg( p_thread, "mmh, packets in the past ("I64Fd")",
msg_Dbg( p_thread, "mmh, packets in the past (%"PRId64")",
i_date_last - i_date );
}
}
......@@ -524,7 +524,7 @@ static void ThreadWrite( vlc_object_t *p_this )
i_sent = mdate();
if ( i_sent > i_date + 20000 )
{
msg_Dbg( p_thread, "packet has been sent too late (" I64Fd ")",
msg_Dbg( p_thread, "packet has been sent too late (%"PRId64 ")",
i_sent - i_date );
}
#endif
......
......@@ -495,7 +495,7 @@ static int PresetCallback( vlc_object_t *p_this, char const *psz_cmd,
eqz_preset_10b[i]->f_amp[j] );
div = lldiv( eqz_preset_10b[i]->f_amp[j] * 10000000,
10000000 );
sprintf( psz_newbands, "%s "I64Fd".%07u", psz_newbands,
sprintf( psz_newbands, "%s %"PRId64".%07u", psz_newbands,
(int64_t)div.quot, (unsigned int) div.rem );
}
if( p_sys->b_first == false )
......
......@@ -405,7 +405,7 @@ static void stream_request_cb(pa_stream *s, size_t length, void *userdata) {
latency = 0;
}
PULSE_DEBUG( "Pulse stream request latency="I64Fd"", latency);
PULSE_DEBUG( "Pulse stream request latency=%"PRId64"", latency);
next_date = mdate() + latency;
......
......@@ -994,7 +994,7 @@ static void WaveOutThread( notification_thread_t *p_notif )
if( p_aout->b_die )
return;
msg_Dbg( p_aout, "will start to play in "I64Fd" us",
msg_Dbg( p_aout, "will start to play in %"PRId64" us",
(p_sys->start_date - AOUT_PTS_TOLERANCE/4)-mdate());
// than wait a short time... before grabbing first frames
......
......@@ -1472,7 +1472,7 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data )
{
/* No output generated */
#ifdef DMO_DEBUG
msg_Dbg( p_enc, "ProcessInput(): no output generated "I64Fd, i_pts );
msg_Dbg( p_enc, "ProcessInput(): no output generated %"PRId64, i_pts );
#endif
return NULL;
}
......@@ -1534,7 +1534,7 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data )
if( db.dwStatus & DMO_OUTPUT_DATA_BUFFERF_TIME )
{
#ifdef DMO_DEBUG
msg_Dbg( p_enc, "ProcessOutput(): pts: "I64Fd", "I64Fd,
msg_Dbg( p_enc, "ProcessOutput(): pts: %"PRId64", %"PRId64,
i_pts, db.rtTimestamp / 10 );
#endif
i_pts = db.rtTimestamp / 10;
......@@ -1544,7 +1544,7 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data )
{
p_block_out->i_length = db.rtTimelength / 10;
#ifdef DMO_DEBUG
msg_Dbg( p_enc, "ProcessOutput(): length: "I64Fd,
msg_Dbg( p_enc, "ProcessOutput(): length: %"PRId64,
p_block_out->i_length );
#endif
}
......
......@@ -406,7 +406,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
}
#ifdef DEBUG_DVBSUB
msg_Dbg( p_dec, "subtitle packet received: "I64Fd, p_sys->i_pts );
msg_Dbg( p_dec, "subtitle packet received: %"PRId64, p_sys->i_pts );
#endif
p_sys->b_page = false;
......
......@@ -254,10 +254,10 @@ int E_(OpenDemux)( vlc_object_t *p_this )
msg_Dbg( p_demux, "AVFormat supported stream" );
msg_Dbg( p_demux, " - format = %s (%s)",
p_sys->fmt->name, p_sys->fmt->long_name );
msg_Dbg( p_demux, " - start time = "I64Fd,
msg_Dbg( p_demux, " - start time = %"PRId64,
( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE ) ?
p_sys->ic->start_time * 1000000 / AV_TIME_BASE : -1 );
msg_Dbg( p_demux, " - duration = "I64Fd,
msg_Dbg( p_demux, " - duration = %"PRId64,
( p_sys->ic->duration != (int64_t)AV_NOPTS_VALUE ) ?
p_sys->ic->duration * 1000000 / AV_TIME_BASE : -1 );
......@@ -327,7 +327,7 @@ static int Demux( demux_t *p_demux )
p_sys->ic->streams[pkt.stream_index]->time_base.den;
#ifdef AVFORMAT_DEBUG
msg_Dbg( p_demux, "tk[%d] dts="I64Fd" pts="I64Fd,
msg_Dbg( p_demux, "tk[%d] dts=%"PRId64" pts=%"PRId64,
pkt.stream_index, p_frame->i_dts, p_frame->i_pts );
#endif
......@@ -380,7 +380,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE )
i64 += p_sys->ic->start_time;
msg_Warn( p_demux, "DEMUX_SET_POSITION: "I64Fd, i64 );
msg_Warn( p_demux, "DEMUX_SET_POSITION: %"PRId64, i64 );
/* If we have a duration, we prefer to seek by time
but if we don't, or if the seek fails, try BYTE seeking */
......@@ -390,7 +390,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
int64_t i_size = stream_Size( p_demux->s );
i64 = (int64_t)i_size * f;
msg_Warn( p_demux, "DEMUX_SET_BYTE_POSITION: "I64Fd, i64 );
msg_Warn( p_demux, "DEMUX_SET_BYTE_POSITION: %"PRId64, i64 );
if( av_seek_frame( p_sys->ic, -1, i64, AVSEEK_FLAG_BYTE ) < 0 )
return VLC_EGENERIC;
}
......@@ -418,7 +418,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE )
i64 += p_sys->ic->start_time;
msg_Warn( p_demux, "DEMUX_SET_TIME: "I64Fd, i64 );
msg_Warn( p_demux, "DEMUX_SET_TIME: %"PRId64, i64 );
if( av_seek_frame( p_sys->ic, -1, i64, 0 ) < 0 )
{
......@@ -476,7 +476,7 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence )
int64_t i_size = stream_Size( p_demux->s );
#ifdef AVFORMAT_DEBUG
msg_Warn( p_demux, "IOSeek offset: "I64Fd", whence: %i", offset, whence );
msg_Warn( p_demux, "IOSeek offset: %"PRId64", whence: %i", offset, whence );
#endif
switch( whence )
......
......@@ -872,13 +872,13 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
if ( p_sys->i_last_pts == frame.pts )
{
msg_Warn( p_enc, "almost fed libavcodec with two frames with the "
"same PTS (" I64Fd ")", frame.pts );
"same PTS (%"PRId64 ")", frame.pts );
return NULL;
}
else if ( p_sys->i_last_pts > frame.pts )
{
msg_Warn( p_enc, "almost fed libavcodec with a frame in the "
"past (current: " I64Fd ", last: "I64Fd")",
"past (current: %"PRId64 ", last: %"PRId64")",
frame.pts, p_sys->i_last_pts );
return NULL;
}
......
......@@ -374,8 +374,8 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
if( av_write_frame( p_sys->oc, &pkt ) < 0 )
{
msg_Err( p_mux, "could not write frame (pts: "I64Fd", dts: "I64Fd") "
"(pkt pts: "I64Fd", dts: "I64Fd")",
msg_Err( p_mux, "could not write frame (pts: %"PRId64", dts: %"PRId64") "
"(pkt pts: %"PRId64", dts: %"PRId64")",
p_data->i_pts, p_data->i_dts, pkt.pts, pkt.dts );
block_Release( p_data );
return VLC_EGENERIC;
......@@ -485,7 +485,7 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence )
int64_t i_absolute;
#ifdef AVFORMAT_DEBUG
msg_Dbg( p_mux, "IOSeek offset: "I64Fd", whence: %i", offset, whence );
msg_Dbg( p_mux, "IOSeek offset: %"PRId64", whence: %i", offset, whence );
#endif
switch( whence )
......
......@@ -205,7 +205,7 @@ static block_t *Reassemble( decoder_t *p_dec, block_t **pp_block )
( p_block->i_pts <= 0 || p_block->i_buffer < 4 ) )
{
msg_Dbg( p_dec, "invalid starting packet (size < 4 or pts <=0)" );
msg_Dbg( p_dec, "spu size: %d, i_pts: "I64Fd" i_buffer: %d",
msg_Dbg( p_dec, "spu size: %d, i_pts: %"PRId64" i_buffer: %d",
p_sys->i_spu_size, p_block->i_pts, p_block->i_buffer );
block_Release( p_block );
return NULL;
......
......@@ -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, I64Fi, (int64_t)val.i_time / I64C(1000000) );
sprintf( time, "%"PRIi64, (int64_t)val.i_time / I64C(1000000) );
var_Get( p_sys->p_input, "length", &val);
sprintf( length, I64Fi, (int64_t)val.i_time / I64C(1000000) );
sprintf( length, "%"PRIi64, (int64_t)val.i_time / I64C(1000000) );
var_Get( p_sys->p_input, "state", &val );
if( val.i_int == PLAYING_S )
......
......@@ -602,7 +602,7 @@ mvar_t *E_(mvar_FileSetNew)( intf_thread_t *p_intf, char *name,
E_(mvar_AppendNewVar)( f, "type", "unknown" );
}
sprintf( psz_ctime, I64Fd, (int64_t)stat_info.st_size );
sprintf( psz_ctime, "%"PRId64, (int64_t)stat_info.st_size );
E_(mvar_AppendNewVar)( f, "size", psz_ctime );
/* FIXME memory leak FIXME */
......
......@@ -234,8 +234,8 @@ static void Run( intf_thread_t *p_intf )
(struct sockaddr *)&from, i_struct_size );
#if 0
msg_Dbg( p_intf, "Master clockref: "I64Fd" -> "I64Fd", from %s "
"(date: "I64Fd")", i_clockref, i_master_clockref,
msg_Dbg( p_intf, "Master clockref: %"PRId64" -> %"PRId64", from %s "
"(date: %"PRId64")", i_clockref, i_master_clockref,
from.ss_family == AF_INET
? inet_ntoa(((struct sockaddr_in *)&from)->sin_addr)
: "non-IPv4", i_date );
......@@ -298,8 +298,8 @@ static void Run( intf_thread_t *p_intf )
}
#if 0
msg_Dbg( p_intf, "Slave clockref: "I64Fd" -> "I64Fd" -> "I64Fd", "
"clock diff: "I64Fd" drift: "I64Fd,
msg_Dbg( p_intf, "Slave clockref: %"PRId64" -> %"PRId64" -> %"PRId64", "
"clock diff: %"PRId64" drift: %"PRId64,
i_clockref, i_master_clockref,
i_client_clockref, i_diff_date, i_drift );
#endif
......
......@@ -91,7 +91,7 @@ static int ASF_ReadObjectCommon( stream_t *s, asf_object_t *p_obj )
#ifdef ASF_DEBUG
msg_Dbg( s,
"found object guid: " GUID_FMT " size:"I64Fd,
"found object guid: " GUID_FMT " size:%"PRId64,
GUID_PRINT( p_common->i_object_id ),
p_common->i_object_size );
#endif
......@@ -202,7 +202,7 @@ static int ASF_ReadObject_Data( stream_t *s, asf_object_t *p_obj )
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"data object\" file_id:" GUID_FMT " total data packet:"
I64Fd" reserved:%d",
"%"PRId64" reserved:%d",
GUID_PRINT( p_data->i_file_id ),
p_data->i_total_data_packets,
p_data->i_reserved );
......@@ -233,7 +233,7 @@ static int ASF_ReadObject_Index( stream_t *s, asf_object_t *p_obj )
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"index object\" file_id:" GUID_FMT
" index_entry_time_interval:"I64Fd" max_packet_count:%d "
" index_entry_time_interval:%"PRId64" max_packet_count:%d "
"index_entry_count:%ld",
GUID_PRINT( p_index->i_file_id ),
p_index->i_index_entry_time_interval,
......@@ -290,8 +290,8 @@ static int ASF_ReadObject_file_properties( stream_t *s, asf_object_t *p_obj )
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"file properties object\" file_id:" GUID_FMT
" file_size:"I64Fd" creation_date:"I64Fd" data_packets_count:"
I64Fd" play_duration:"I64Fd" send_duration:"I64Fd" preroll:"I64Fd
" file_size:%"PRId64" creation_date:%"PRId64" data_packets_count:"
"%"PRId64" play_duration:%"PRId64" send_duration:%"PRId64" preroll:%"PRId64
" flags:%d min_data_packet_size:%d "
" max_data_packet_size:%d max_bitrate:%d",
GUID_PRINT( p_fp->i_file_id ), p_fp->i_file_size,
......@@ -434,7 +434,7 @@ static int ASF_ReadObject_metadata( stream_t *s, asf_object_t *p_obj )
msg_Dbg( s, " - %s (%i bytes)",
p_rec->psz_name, p_rec->i_data );
else
msg_Dbg( s, " - %s="I64Fd,
msg_Dbg( s, " - %s=%"PRId64,
p_rec->psz_name, p_rec->i_val );
}
#endif
......@@ -575,7 +575,7 @@ static int ASF_ReadObject_stream_properties( stream_t *s, asf_object_t *p_obj )
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"stream Properties object\" stream_type:" GUID_FMT
" error_correction_type:" GUID_FMT " time_offset:"I64Fd
" error_correction_type:" GUID_FMT " time_offset:%"PRId64
" type_specific_data_length:%d error_correction_data_length:%d"
" flags:0x%x stream_number:%d",
GUID_PRINT( p_sp->i_stream_type ),
......@@ -966,7 +966,7 @@ static int ASF_ReadObject_extended_stream_properties( stream_t *s,
#ifdef ASF_DEBUG
msg_Dbg( s, "read \"extended stream properties object\":" );
msg_Dbg( s, " - start="I64Fd" end="I64Fd,
msg_Dbg( s, " - start=%"PRId64" end=%"PRId64,
p_esp->i_start_time, p_esp->i_end_time );
msg_Dbg( s, " - data bitrate=%d buffer=%d initial fullness=%d",
p_esp->i_data_bitrate,
......@@ -980,7 +980,7 @@ static int ASF_ReadObject_extended_stream_properties( stream_t *s,
msg_Dbg( s, " - flags=0x%x", p_esp->i_flags );
msg_Dbg( s, " - stream number=%d language=%d",
p_esp->i_stream_number, p_esp->i_language_index );
msg_Dbg( s, " - average time per frame="I64Fd,
msg_Dbg( s, " - average time per frame=%"PRId64,
p_esp->i_average_time_per_frame );
msg_Dbg( s, " - stream name count=%d", p_esp->i_stream_name_count );
for( i = 0; i < p_esp->i_stream_name_count; i++ )
......@@ -1159,7 +1159,7 @@ static int ASF_ReadObject_extended_content_description( stream_t *s,
else if( i_type == 4 )
{
/* QWord */
asprintf( &p_ec->ppsz_value[i], I64Fd, GetQWLE(p_data));
asprintf( &p_ec->ppsz_value[i], "%"PRId64, GetQWLE(p_data));
}
else if( i_type == 5 )
{
......@@ -1457,7 +1457,7 @@ static void ASF_ObjectDumpDebug( vlc_object_t *p_obj,
str[i * 5] = '|';
}
snprintf( str + 5*i_level, 1024,
"+ '%s' GUID "GUID_FMT" size:"I64Fu"pos:"I64Fu,
"+ '%s' GUID "GUID_FMT" size:%"PRIu64"pos:%"PRIu64,
psz_name,
GUID_PRINT( p_node->i_object_id ),
p_node->i_object_size, p_node->i_object_pos );
......
......@@ -1294,7 +1294,7 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
demux_sys_t *p_sys = p_demux->p_sys;
unsigned int i_stream;
msg_Dbg( p_demux, "seek requested: "I64Fd" seconds %d%%",
msg_Dbg( p_demux, "seek requested: %"PRId64" seconds %d%%",
i_date / 1000000, i_percent );
if( p_sys->b_seekable )
......@@ -1354,7 +1354,7 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
i_date = AVI_GetPTS( p_stream );
/* TODO better support for i_samplesize != 0 */
msg_Dbg( p_demux, "estimate date "I64Fd, i_date );
msg_Dbg( p_demux, "estimate date %"PRId64, i_date );
}
/* */
......@@ -1368,7 +1368,7 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
AVI_TrackSeek( p_demux, i_stream, i_date );
}
p_sys->i_time = i_date;
msg_Dbg( p_demux, "seek: "I64Fd" seconds", p_sys->i_time /1000000 );
msg_Dbg( p_demux, "seek: %"PRId64" seconds", p_sys->i_time /1000000 );
return VLC_SUCCESS;
}
else
......@@ -1776,7 +1776,7 @@ static int AVI_TrackSeek( demux_t *p_demux,
}
msg_Dbg( p_demux,
"old:"I64Fd" %s new "I64Fd,
"old:%"PRId64" %s new %"PRId64,
i_oldpts,
i_oldpts > i_date ? ">" : "<",
i_date );
......@@ -2538,7 +2538,7 @@ static mtime_t AVI_MovieGetLength( demux_t *p_demux )
i_length /= (mtime_t)1000000; /* in seconds */
msg_Dbg( p_demux,
"stream[%d] length:"I64Fd" (based on index)",
"stream[%d] length:%"PRId64" (based on index)",
i,
i_length );
i_maxlength = __MAX( i_maxlength, i_length );
......
......@@ -71,7 +71,7 @@ static int AVI_ChunkReadCommon( stream_t *s, avi_chunk_t *p_chk )
#ifdef AVI_DEBUG
msg_Dbg( (vlc_object_t*)s,
"found Chunk fourcc:%8.8x (%4.4s) size:"I64Fd" pos:"I64Fd,
"found Chunk fourcc:%8.8x (%4.4s) size:%"PRId64" pos:%"PRId64,
p_chk->common.i_chunk_fourcc,
(char*)&p_chk->common.i_chunk_fourcc,
p_chk->common.i_chunk_size,
......@@ -811,7 +811,7 @@ static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
p_chk->common.i_chunk_fourcc == AVIFOURCC_LIST )
{
sprintf( str + i_level * 5,
"%c %4.4s-%4.4s size:"I64Fu" pos:"I64Fu,
"%c %4.4s-%4.4s size:%"PRIu64" pos:%"PRIu64,
i_level ? '+' : '*',
(char*)&p_chk->common.i_chunk_fourcc,
(char*)&p_chk->list.i_type,
......@@ -821,7 +821,7 @@ static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
else
{
sprintf( str + i_level * 5,
"+ %4.4s size:"I64Fu" pos:"I64Fu,
"+ %4.4s size:%"PRIu64" pos:%"PRIu64,
(char*)&p_chk->common.i_chunk_fourcc,
p_chk->common.i_chunk_size,
p_chk->common.i_chunk_pos );
......
......@@ -146,7 +146,7 @@ static void Close( vlc_object_t *p_this )
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
msg_Info( p_demux ,"closing %s ("I64Fd" Kbytes dumped)", p_sys->psz_file,
msg_Info( p_demux ,"closing %s (%"PRId64" Kbytes dumped)", p_sys->psz_file,
p_sys->i_write / 1024 );
if( p_sys->p_file != stdout )
......
......@@ -2059,7 +2059,7 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
tk->i_last_dts = p_block->i_dts;
#if 0
msg_Dbg( p_demux, "block i_dts: "I64Fd" / i_pts: "I64Fd, p_block->i_dts, p_block->i_pts);
msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_block->i_pts);
#endif
if( strcmp( tk->psz_codec, "S_VOBSUB" ) )
{
......@@ -2104,13 +2104,13 @@ matroska_stream_c *demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, EbmlS
#if LIBMATROSKA_VERSION >= 0x000800
if (uint64(doc_read_version) > 2)
{
msg_Err( p_demux, "This matroska file is needs version "I64Fd" and this VLC only supports version 1 & 2", uint64(doc_read_version));
msg_Err( p_demux, "This matroska file is needs version %"PRId64" and this VLC only supports version 1 & 2", uint64(doc_read_version));
return NULL;
}
#else
if (uint64(doc_read_version) != 1)
{
msg_Err( p_demux, "This matroska file is needs version "I64Fd" and this VLC only supports version 1", uint64(doc_read_version));
msg_Err( p_demux, "This matroska file is needs version %"PRId64" and this VLC only supports version 1", uint64(doc_read_version));
return NULL;
}
#endif
......@@ -3373,7 +3373,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, chapter_it
int i_index;
msg_Dbg( p_demux, "seek request to "I64Fd" (%f%%)", i_date, f_percent );
msg_Dbg( p_demux, "seek request to %"PRId64" (%f%%)", i_date, f_percent );
if( i_date < 0 && f_percent < 0 )
{
msg_Warn( p_demux, "cannot seek nowhere !" );
......@@ -3948,7 +3948,7 @@ void matroska_segment_c::LoadCues( )
ep->Up();
#if 0
msg_Dbg( &sys.demuxer, " * added time="I64Fd" pos="I64Fd
msg_Dbg( &sys.demuxer, " * added time=%"PRId64" pos=%"PRId64
" track=%d bnum=%d", idx.i_time, idx.i_position,
idx.i_track, idx.i_block_number );
#endif
......@@ -4147,17 +4147,17 @@ void matroska_segment_c::ParseSeekHead( KaxSeekHead *seekhead )
{
if( id == KaxCues::ClassInfos.GlobalId )
{
msg_Dbg( &sys.demuxer, "| | | = cues at "I64Fd, i_pos );
msg_Dbg( &sys.demuxer, "| | | = cues at %"PRId64, i_pos );
i_cues_position = segment->GetGlobalPosition( i_pos );
}
else if( id == KaxChapters::ClassInfos.GlobalId )
{
msg_Dbg( &sys.demuxer, "| | | = chapters at "I64Fd, i_pos );
msg_Dbg( &sys.demuxer, "| | | = chapters at %"PRId64, i_pos );
i_chapters_position = segment->GetGlobalPosition( i_pos );
}
else if( id == KaxTags::ClassInfos.GlobalId )
{
msg_Dbg( &sys.demuxer, "| | | = tags at "I64Fd, i_pos );
msg_Dbg( &sys.demuxer, "| | | = tags at %"PRId64, i_pos );
i_tags_position = segment->GetGlobalPosition( i_pos );
}
}
......@@ -4298,7 +4298,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
KaxTrackDefaultDuration &defd = *(KaxTrackDefaultDuration*)l;
tk->i_default_duration = uint64(defd);
msg_Dbg( &sys.demuxer, "| | | + Track Default Duration="I64Fd, uint64(defd) );
msg_Dbg( &sys.demuxer, "| | | + Track Default Duration=%"PRId64, uint64(defd) );
}
else if( MKV_IS_ID( l, KaxTrackTimecodeScale ) )
{
......@@ -4341,7 +4341,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
tk->p_extra_data = (uint8_t*)malloc( tk->i_extra_data );
memcpy( tk->p_extra_data, cpriv.GetBuffer(), tk->i_extra_data );
}
msg_Dbg( &sys.demuxer, "| | | + Track CodecPrivate size="I64Fd, cpriv.GetSize() );
msg_Dbg( &sys.demuxer, "| | | + Track CodecPrivate size=%"PRId64, cpriv.GetSize() );
}
else if( MKV_IS_ID( l, KaxCodecName ) )
{
......@@ -4728,7 +4728,7 @@ void matroska_segment_c::ParseInfo( KaxInfo *info )
i_timescale = uint64(tcs);
msg_Dbg( &sys.demuxer, "| | + TimecodeScale="I64Fd,
msg_Dbg( &sys.demuxer, "| | + TimecodeScale=%"PRId64,
i_timescale );
}
else if( MKV_IS_ID( l, KaxDuration ) )
......@@ -4737,7 +4737,7 @@ void matroska_segment_c::ParseInfo( KaxInfo *info )
i_duration = mtime_t( double( dur ) );
msg_Dbg( &sys.demuxer, "| | + Duration="I64Fd,
msg_Dbg( &sys.demuxer, "| | + Duration=%"PRId64,
i_duration );
}
else if( MKV_IS_ID( l, KaxMuxingApp ) )
......@@ -5733,7 +5733,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset )
i_seek_time = p_indexes[i_idx].i_time;
}
msg_Dbg( &sys.demuxer, "seek got "I64Fd" (%d%%)",
msg_Dbg( &sys.demuxer, "seek got %"PRId64" (%d%%)",
i_seek_time, (int)( 100 * i_seek_position / stream_Size( sys.demuxer.s ) ) );
es.I_O().setFilePointer( i_seek_position, seek_beginning );
......@@ -6657,7 +6657,7 @@ bool matroska_script_interpretor_c::Interpret( const binary * p_command, size_t
chapter_item_c *p_chapter = sys.FindChapter( i_chapter_uid, p_segment );
if ( p_chapter == NULL )
msg_Dbg( &sys.demuxer, "Chapter "I64Fd" not found", i_chapter_uid);
msg_Dbg( &sys.demuxer, "Chapter %"PRId64" not found", i_chapter_uid);
else
{
if ( !p_chapter->EnterAndLeave( sys.p_current_segment->CurrentChapter() ) )
......
......@@ -232,7 +232,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_time = 1;
p_sys->i_length = ModPlug_GetLength( p_sys->f ) * (int64_t)1000;
msg_Dbg( p_demux, "MOD loaded name=%s lenght="I64Fd"ms",
msg_Dbg( p_demux, "MOD loaded name=%s lenght=%"PRId64"ms",
ModPlug_GetName( p_sys->f ),
p_sys->i_length );
......
......@@ -224,10 +224,10 @@ int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box )
if( p_box->i_size )
{
if MP4_BOX_TYPE_ASCII()
msg_Dbg( p_stream, "found Box: %4.4s size "I64Fd,
msg_Dbg( p_stream, "found Box: %4.4s size %"PRId64,
(char*)&p_box->i_type, p_box->i_size );
else
msg_Dbg( p_stream, "found Box: c%3.3s size "I64Fd,
msg_Dbg( p_stream, "found Box: c%3.3s size %"PRId64,
(char*)&p_box->i_type+1, p_box->i_size );
}
#endif
......@@ -1209,7 +1209,7 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
p_box->data.p_sample_soun->i_bytes_per_frame = 0;
p_box->data.p_sample_soun->i_bytes_per_sample = 0;