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

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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment