diff options
author | konablend <[email protected]> | 2009-06-25 07:00:41 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-06-25 07:00:41 +0000 |
commit | 9b4832cb8c05f72dfe0a2d7dbdc22d4468434de6 (patch) | |
tree | 0350dca266d6003cc4530dd3ace46d324b3d4629 | |
parent | eef252057e08aeffc4a8b43d6eba838012debc28 (diff) |
- cleanup gcc format warnings showing up on linux 64-bit
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2619 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/decavcodec.c | 4 | ||||
-rw-r--r-- | libhb/decmetadata.c | 2 | ||||
-rw-r--r-- | libhb/decmpeg2.c | 4 | ||||
-rw-r--r-- | libhb/decsrtsub.c | 4 | ||||
-rw-r--r-- | libhb/dvd.c | 4 | ||||
-rw-r--r-- | libhb/dvdnav.c | 4 | ||||
-rw-r--r-- | libhb/encx264.c | 2 | ||||
-rw-r--r-- | libhb/fifo.c | 4 | ||||
-rw-r--r-- | libhb/muxcommon.c | 6 | ||||
-rw-r--r-- | libhb/muxmp4.c | 14 | ||||
-rw-r--r-- | libhb/reader.c | 2 | ||||
-rw-r--r-- | libhb/render.c | 6 | ||||
-rw-r--r-- | libhb/stream.c | 21 | ||||
-rw-r--r-- | libhb/sync.c | 14 |
14 files changed, 47 insertions, 44 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 71f72fe81..e711a5a7f 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -525,12 +525,12 @@ static void log_chapter( hb_work_private_t *pv, int chap_num, int64_t pts ) hb_chapter_t *c = hb_list_item( pv->job->title->list_chapter, chap_num - 1 ); if ( c && c->title ) { - hb_log( "%s: \"%s\" (%d) at frame %u time %lld", + hb_log( "%s: \"%s\" (%d) at frame %u time %"PRId64, pv->context->codec->name, c->title, chap_num, pv->nframes, pts ); } else { - hb_log( "%s: Chapter %d at frame %u time %lld", + hb_log( "%s: Chapter %d at frame %u time %"PRId64, pv->context->codec->name, chap_num, pv->nframes, pts ); } } diff --git a/libhb/decmetadata.c b/libhb/decmetadata.c index df0c5b3ef..e377f8c25 100644 --- a/libhb/decmetadata.c +++ b/libhb/decmetadata.c @@ -84,7 +84,7 @@ static void decmp4metadata( hb_title_t *title ) chapter->minutes = ( ( chapter->duration / 90000 ) % 3600 ) / 60; chapter->seconds = ( chapter->duration / 90000 ) % 60; strcpy( chapter->title, chapter_list[i-1].title ); - hb_deep_log( 2, "Added chapter %i, name='%s', dur=%lld, (%02i:%02i:%02i)", chapter->index, chapter->title, + hb_deep_log( 2, "Added chapter %i, name='%s', dur=%"PRId64", (%02i:%02i:%02i)", chapter->index, chapter->title, chapter->duration, chapter->hours, chapter->minutes, chapter->seconds); hb_list_add( title->list_chapter, chapter ); diff --git a/libhb/decmpeg2.c b/libhb/decmpeg2.c index 06522dfae..03d906dc8 100644 --- a/libhb/decmpeg2.c +++ b/libhb/decmpeg2.c @@ -299,7 +299,7 @@ static int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, buf->new_chap - 1 ); chap_name = c->title; } - hb_log( "mpeg2: \"%s\" (%d) at frame %u time %lld", + hb_log( "mpeg2: \"%s\" (%d) at frame %u time %"PRId64, chap_name, buf->new_chap, m->nframes, buf->start ); } else if ( m->nframes == 0 && m->job && hb_list_item( m->job->title->list_chapter, @@ -307,7 +307,7 @@ static int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, { hb_chapter_t * c = hb_list_item( m->job->title->list_chapter, m->job->chapter_start - 1 ); - hb_log( "mpeg2: \"%s\" (%d) at frame %u time %lld", c->title, + hb_log( "mpeg2: \"%s\" (%d) at frame %u time %"PRId64, c->title, m->job->chapter_start, m->nframes, buf->start ); } ++m->nframes; diff --git a/libhb/decsrtsub.c b/libhb/decsrtsub.c index 51aaeeb90..e5d694a3b 100644 --- a/libhb/decsrtsub.c +++ b/libhb/decsrtsub.c @@ -155,7 +155,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv ) if( !( start_time > pv->start_time && stop_time < pv->stop_time ) ) { - hb_deep_log( 3, "Discarding SRT at time start %lld, stop %lld", start_time, stop_time); + hb_deep_log( 3, "Discarding SRT at time start %"PRId64", stop %"PRId64, start_time, stop_time); memset( &pv->current_entry, 0, sizeof( srt_entry_t ) ); ++(pv->number_of_entries); pv->current_state = k_state_timecode; @@ -259,7 +259,7 @@ static int decsrtInit( hb_work_object_t * w, hb_job_t * job ) retval = 0; } - hb_deep_log( 3, "SRT Start time %lld, stop time %lld", pv->start_time, pv->stop_time); + hb_deep_log( 3, "SRT Start time %"PRId64", stop time %"PRId64, pv->start_time, pv->stop_time); pv->iconv_context = iconv_open( "utf8", pv->subtitle->config.src_codeset ); diff --git a/libhb/dvd.c b/libhb/dvd.c index b26725da9..29ed04fd4 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -276,7 +276,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t ) title->hours = title->duration / 90000 / 3600; title->minutes = ( ( title->duration / 90000 ) % 3600 ) / 60; title->seconds = ( title->duration / 90000 ) % 60; - hb_log( "scan: duration is %02d:%02d:%02d (%lld ms)", + hb_log( "scan: duration is %02d:%02d:%02d (%"PRId64" ms)", title->hours, title->minutes, title->seconds, title->duration / 90 ); @@ -597,7 +597,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t ) chapter->minutes = ( seconds % 3600 ) / 60; chapter->seconds = seconds % 60; - hb_log( "scan: chap %d c=%d->%d, b=%d->%d (%d), %lld ms", + hb_log( "scan: chap %d c=%d->%d, b=%d->%d (%d), %"PRId64" ms", chapter->index, chapter->cell_start, chapter->cell_end, chapter->block_start, chapter->block_end, chapter->block_count, chapter->duration / 90 ); diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 805e8f2bf..8cc59951a 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -452,7 +452,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t ) title->hours = title->duration / 90000 / 3600; title->minutes = ( ( title->duration / 90000 ) % 3600 ) / 60; title->seconds = ( title->duration / 90000 ) % 60; - hb_log( "scan: duration is %02d:%02d:%02d (%lld ms)", + hb_log( "scan: duration is %02d:%02d:%02d (%"PRId64" ms)", title->hours, title->minutes, title->seconds, title->duration / 90 ); @@ -774,7 +774,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t ) chapter->minutes = ( seconds % 3600 ) / 60; chapter->seconds = seconds % 60; - hb_log( "scan: chap %d c=%d->%d, b=%d->%d (%d), %lld ms", + hb_log( "scan: chap %d c=%d->%d, b=%d->%d (%d), %"PRId64" ms", chapter->index, chapter->cell_start, chapter->cell_end, chapter->block_start, chapter->block_end, chapter->block_count, chapter->duration / 90 ); diff --git a/libhb/encx264.c b/libhb/encx264.c index 880ca23ed..94523d353 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -596,7 +596,7 @@ static hb_buffer_t *x264_encode( hb_work_object_t *w, hb_buffer_t *in ) */ if( pv->last_stop != in->start ) { - hb_log("encx264 input continuity err: last stop %lld start %lld", + hb_log("encx264 input continuity err: last stop %"PRId64" start %"PRId64, pv->last_stop, in->start); } pv->last_stop = in->stop; diff --git a/libhb/fifo.c b/libhb/fifo.c index 7337874bf..48f645970 100644 --- a/libhb/fifo.c +++ b/libhb/fifo.c @@ -90,8 +90,8 @@ void hb_buffer_pool_free( void ) } } - hb_deep_log( 2, "Allocated %lld bytes of buffers on this pass and Freed %lld bytes, " - "%lld bytes leaked", buffers.allocated, freed, buffers.allocated - freed); + hb_deep_log( 2, "Allocated %"PRId64" bytes of buffers on this pass and Freed %"PRId64" bytes, " + "%"PRId64" bytes leaked", buffers.allocated, freed, buffers.allocated - freed); buffers.allocated = 0; hb_unlock(buffers.lock); } diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index 4c2c68009..1f39df11d 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -340,21 +340,21 @@ finished: if( !stat( job->file, &sb ) ) { - hb_deep_log( 2, "mux: file size, %lld bytes", (uint64_t) sb.st_size ); + hb_deep_log( 2, "mux: file size, %"PRId64" bytes", (uint64_t) sb.st_size ); bytes_total = 0; frames_total = 0; for( i = 0; i < mux->ntracks; ++i ) { track = mux->track[i]; - hb_log( "mux: track %d, %lld frames, %lld bytes, %.2f kbps, fifo %d", + hb_log( "mux: track %d, %"PRId64" frames, %"PRId64" bytes, %.2f kbps, fifo %d", i, track->frames, track->bytes, 90000.0 * track->bytes / mux->pts / 125, track->mf.flen ); if( !i && ( job->vquality < 0.0 || job->vquality > 1.0 ) ) { /* Video */ - hb_deep_log( 2, "mux: video bitrate error, %+lld bytes", + hb_deep_log( 2, "mux: video bitrate error, %+"PRId64" bytes", (int64_t)(track->bytes - mux->pts * job->vbitrate * 125 / 90000) ); } bytes_total += track->bytes; diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index aaaa7d94b..e8e52751c 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -60,7 +60,7 @@ static int MP4TuneTrackDurationPerChunk( hb_mux_object_t* m, MP4TrackId trackId return 0; } - hb_deep_log( 2, "muxmp4: track %u, chunk duration %llu", MP4FindTrackIndex( m->file, trackId ), dur ); + hb_deep_log( 2, "muxmp4: track %u, chunk duration %"PRIu64, MP4FindTrackIndex( m->file, trackId ), dur ); return 1; } @@ -548,8 +548,8 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data, offset = buf->start + m->init_delay - m->sum_dur; if ( offset < 0 ) { - hb_log("MP4Mux: illegal render offset %lld, start %lld," - "stop %lld, sum_dur %lld", + hb_log("MP4Mux: illegal render offset %"PRId64", start %"PRId64"," + "stop %"PRId64", sum_dur %"PRId64, offset, buf->start, buf->stop, m->sum_dur ); offset = 0; } @@ -596,8 +596,8 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data, be possible and usually indicates a bug in the upstream code. Complain in the hope that someone will go find the bug but try to fix the error so that the file will still be playable. */ - hb_log("MP4Mux: illegal duration %lld, start %lld," - "stop %lld, sum_dur %lld", + hb_log("MP4Mux: illegal duration %"PRId64", start %"PRId64"," + "stop %"PRId64", sum_dur %"PRId64, duration, buf->start, buf->stop, m->sum_dur ); /* we don't know when the next frame starts so we can't pick a valid duration for this one. we pick something "short" @@ -708,9 +708,9 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data, } mux_data->sum_dur += (buf->stop - buf->start); - hb_deep_log(3, "MuxMP4:Sub:%fs:%lld:%lld:%lld: %s", (float)buf->start / 90000, buf->start, buf->stop, + hb_deep_log(3, "MuxMP4:Sub:%fs:%"PRId64":%"PRId64":%"PRId64": %s", (float)buf->start / 90000, buf->start, buf->stop, (buf->stop - buf->start), buf->data); - hb_deep_log(3, "MuxMP4:Total time elapsed:%lld", mux_data->sum_dur); + hb_deep_log(3, "MuxMP4:Total time elapsed:%"PRId64, mux_data->sum_dur); } } else diff --git a/libhb/reader.c b/libhb/reader.c index 5dc30afe9..88617f90b 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -343,7 +343,7 @@ static void ReaderFunc( void * _r ) // force a new scr offset computation r->scr_changes = r->demux.scr_changes - 1; r->saw_video = 1; - hb_log( "reader: first SCR %lld", r->demux.last_scr ); + hb_log( "reader: first SCR %"PRId64, r->demux.last_scr ); } else { diff --git a/libhb/render.c b/libhb/render.c index 894bdb0d0..5b9ccca88 100644 --- a/libhb/render.c +++ b/libhb/render.c @@ -674,10 +674,10 @@ void renderClose( hb_work_object_t * w ) /* Preserve dropped frame count for more accurate framerates in 2nd passes. */ interjob->render_dropped = pv->dropped_frames; - hb_log("render: lost time: %lld (%i frames)", pv->total_lost_time, pv->dropped_frames); - hb_log("render: gained time: %lld (%i frames) (%lld not accounted for)", pv->total_gained_time, pv->extended_frames, pv->total_lost_time - pv->total_gained_time); + hb_log("render: lost time: %"PRId64" (%i frames)", pv->total_lost_time, pv->dropped_frames); + hb_log("render: gained time: %"PRId64" (%i frames) (%"PRId64" not accounted for)", pv->total_gained_time, pv->extended_frames, pv->total_lost_time - pv->total_gained_time); if (pv->dropped_frames) - hb_log("render: average dropped frame duration: %lld", (pv->total_lost_time / pv->dropped_frames) ); + hb_log("render: average dropped frame duration: %"PRId64, (pv->total_lost_time / pv->dropped_frames) ); /* Cleanup subtitle queue */ if( pv->subtitle_queue ) diff --git a/libhb/stream.c b/libhb/stream.c index 37682b14f..7f863c508 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -275,9 +275,12 @@ static void ts_warn_helper( hb_stream_t *stream, char *log, va_list args ) } } +static void ts_warn( hb_stream_t*, char*, ... ) HB_WPRINTF(2,3); +static void ts_err( hb_stream_t*, int, char*, ... ) HB_WPRINTF(3,4); + static void ts_warn( hb_stream_t *stream, char *log, ... ) { - va_list args; + va_list args; va_start( args, log ); ts_warn_helper( stream, log, args ); va_end( args ); @@ -285,7 +288,7 @@ static void ts_warn( hb_stream_t *stream, char *log, ... ) static void ts_err( hb_stream_t *stream, int curstream, char *log, ... ) { - va_list args; + va_list args; va_start( args, log ); ts_warn_helper( stream, log, args ); va_end( args ); @@ -751,10 +754,10 @@ static const uint8_t *next_packet( hb_stream_t *stream ) off_t pos2 = align_to_next_packet(stream); if ( pos2 == 0 ) { - hb_log( "next_packet: eof while re-establishing sync @ %lld", pos ); + hb_log( "next_packet: eof while re-establishing sync @ %"PRId64, pos ); return NULL; } - ts_warn( stream, "next_packet: sync lost @ %lld, regained after %lld bytes", + ts_warn( stream, "next_packet: sync lost @ %"PRId64", regained after %"PRId64" bytes", pos, pos2 ); } } @@ -1025,12 +1028,12 @@ static struct pts_pos hb_sample_pts(hb_stream_t *stream, uint64_t fpos) buf = hb_ts_stream_getPEStype( stream, stream->ts_video_pids[0] ); if ( buf == NULL ) { - hb_log("hb_sample_pts: couldn't find video packet near %llu", fpos); + hb_log("hb_sample_pts: couldn't find video packet near %"PRIu64, fpos); return pp; } if ( ( buf[7] >> 7 ) != 1 ) { - hb_log("hb_sample_pts: no PTS in video packet near %llu", fpos); + hb_log("hb_sample_pts: no PTS in video packet near %"PRIu64, fpos); return pp; } pp.pts = ( ( (uint64_t)buf[9] >> 1 ) & 7 << 30 ) | @@ -1229,7 +1232,7 @@ int hb_stream_seek_chapter( hb_stream_t * stream, int chapter_num ) int64_t pos = ( ( ( sum_dur - chapter->duration ) * AV_TIME_BASE ) / 90000 ); - hb_deep_log( 2, "Seeking to chapter %d: starts %lld, ends %lld, AV pos %lld", + hb_deep_log( 2, "Seeking to chapter %d: starts %"PRId64", ends %"PRId64", AV pos %"PRId64, chapter_num, sum_dur - chapter->duration, sum_dur, pos); if ( chapter_num > 1 && pos > 0 ) @@ -2721,7 +2724,7 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream ) chapter->minutes = ( ( chapter->duration / 90000 ) % 3600 ) / 60; chapter->seconds = ( chapter->duration / 90000 ) % 60; strcpy( chapter->title, m->title ); - hb_deep_log( 2, "Added chapter %i, name='%s', dur=%llu, (%02i:%02i:%02i)", + hb_deep_log( 2, "Added chapter %i, name='%s', dur=%"PRIu64", (%02i:%02i:%02i)", chapter->index, chapter->title, chapter->duration, chapter->hours, chapter->minutes, chapter->seconds ); @@ -2898,7 +2901,7 @@ static int ffmpeg_read( hb_stream_t *stream, hb_buffer_t *buf ) { stream->chapter_end += chapter->duration; buf->new_chap = stream->chapter + 1; - hb_deep_log( 2, "ffmpeg_read starting chapter %i at %lld", + hb_deep_log( 2, "ffmpeg_read starting chapter %i at %"PRId64, buf->new_chap, buf->start); } else { // Must have run out of chapters, stop looking. diff --git a/libhb/sync.c b/libhb/sync.c index 14e5048dc..1ceeee9c3 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -377,7 +377,7 @@ static void SyncVideo( hb_work_object_t * w ) * as if it started at zero so that our audio timing will * be in sync. */ - hb_log( "sync: first pts is %lld", cur->start ); + hb_log( "sync: first pts is %"PRId64, cur->start ); cur->start = 0; } } @@ -417,7 +417,7 @@ static void SyncVideo( hb_work_object_t * w ) if ( pv->first_drop ) { hb_log( "sync: video time didn't advance - dropped %d frames " - "(delta %d ms, current %lld, next %lld, dur %d)", + "(delta %d ms, current %"PRId64", next %"PRId64", dur %d)", pv->drop_count, (int)( cur->start - pv->first_drop ) / 90, cur->start, next->start, (int)( next->start - cur->start ) ); pv->first_drop = 0; @@ -714,7 +714,7 @@ static void SyncVideo( hb_work_object_t * w ) pts_skip = 0; if ( duration <= 0 ) { - hb_log( "sync: invalid video duration %lld, start %lld, next %lld", + hb_log( "sync: invalid video duration %"PRId64", start %"PRId64", next %"PRId64"", duration, buf_tmp->start, next->start ); } @@ -879,7 +879,7 @@ static void SyncAudio( hb_work_object_t * w, int i ) { // we were dropping old data but input buf time is now current hb_log( "sync: audio %d time went backwards %d ms, dropped %d frames " - "(next %lld, current %lld)", i, + "(next %"PRId64", current %"PRId64")", i, (int)( sync->next_pts - sync->first_drop ) / 90, sync->drop_count, sync->first_drop, sync->next_pts ); sync->first_drop = 0; @@ -894,7 +894,7 @@ static void SyncAudio( hb_work_object_t * w, int i ) // frame and this. assume we got a corrupted timestamp // and just drop the next buf. hb_log( "sync: %d minute time gap in audio %d - dropping buf" - " start %lld, next %lld", + " start %"PRId64", next %"PRId64, (int)((start - sync->next_pts) / (90000*60)), i, start, sync->next_pts ); buf = hb_fifo_get( audio->priv.fifo_raw ); @@ -910,7 +910,7 @@ static void SyncAudio( hb_work_object_t * w, int i ) if( sync->audio->config.out.codec == HB_ACODEC_DCA ) { hb_log( "sync: audio gap %d ms. Skipping frames. Audio %d" - " start %lld, next %lld", + " start %"PRId64", next %"PRId64, (int)((start - sync->next_pts) / 90), i, start, sync->next_pts ); pv->audio_passthru_slip += (start - sync->next_pts); @@ -918,7 +918,7 @@ static void SyncAudio( hb_work_object_t * w, int i ) return; } hb_log( "sync: adding %d ms of silence to audio %d" - " start %lld, next %lld", + " start %"PRId64", next %"PRId64, (int)((start - sync->next_pts) / 90), i, start, sync->next_pts ); InsertSilence( w, i, start - sync->next_pts ); |