aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-13 18:33:56 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-13 18:33:56 +0000
commit169416fd51654b847e03dc9632b615c7f0a85b2a (patch)
tree8cefffb8b02dc50b41ed7927fe840658e767b549
parent619b57225d4bc137ee2ab6cd2b78e198c3a4b9fa (diff)
Use PRI?64 defines as format strings for 64 bit variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16751 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/aviprint.c2
-rw-r--r--libmpdemux/cache2.c6
-rw-r--r--libmpdemux/demux_aac.c2
-rw-r--r--libmpdemux/demux_mkv.c4
-rw-r--r--libmpdemux/demux_ogg.c2
-rw-r--r--libmpdemux/demux_ts.c10
-rw-r--r--libmpdemux/demux_ty.c20
-rw-r--r--libmpdemux/demux_vqf.c2
-rw-r--r--libmpdemux/muxer_lavf.c2
-rw-r--r--libmpdemux/muxer_mpeg.c34
-rw-r--r--libmpdemux/network.c6
-rw-r--r--libmpdemux/stream.c15
-rw-r--r--libmpdemux/stream_file.c6
-rw-r--r--libmpdemux/stream_ftp.c6
-rw-r--r--m_option.c16
15 files changed, 52 insertions, 81 deletions
diff --git a/libmpdemux/aviprint.c b/libmpdemux/aviprint.c
index 9bde59ad5d..fe89f94a84 100644
--- a/libmpdemux/aviprint.c
+++ b/libmpdemux/aviprint.c
@@ -157,7 +157,7 @@ void print_avistdindex_chunk(avistdindex_chunk *h){
mp_msg (MSGT_HEADER, MSGL_V, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
mp_msg (MSGT_HEADER, MSGL_V, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
mp_msg (MSGT_HEADER, MSGL_V, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
- mp_msg (MSGT_HEADER, MSGL_V, " qwBaseOffset (0x%llX) dwReserved3 (%d)\n", h->qwBaseOffset, h->dwReserved3);
+ mp_msg (MSGT_HEADER, MSGL_V, " qwBaseOffset (0x%"PRIX64") dwReserved3 (%d)\n", h->qwBaseOffset, h->dwReserved3);
mp_msg (MSGT_HEADER, MSGL_V, "===========================\n");
}
void print_avisuperindex_chunk(avisuperindex_chunk *h){
diff --git a/libmpdemux/cache2.c b/libmpdemux/cache2.c
index a499c016b8..d0822b1205 100644
--- a/libmpdemux/cache2.c
+++ b/libmpdemux/cache2.c
@@ -362,11 +362,7 @@ int cache_stream_seek_long(stream_t *stream,off_t pos){
// stream->buf_pos=stream->buf_len=0;
// return 1;
-#ifdef _LARGEFILE_SOURCE
- mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
-#else
- mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
-#endif
+ mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos));
return 0;
}
diff --git a/libmpdemux/demux_aac.c b/libmpdemux/demux_aac.c
index d1215450b3..20aa3f38a4 100644
--- a/libmpdemux/demux_aac.c
+++ b/libmpdemux/demux_aac.c
@@ -121,7 +121,7 @@ static int demux_aac_probe(demuxer_t *demuxer)
if(cnt < 8)
goto fail;
- mp_msg(MSGT_DEMUX, MSGL_V, "demux_aac_probe, INIT: %llu, PROBED: %llu, cnt: %d\n", init, probed, cnt);
+ mp_msg(MSGT_DEMUX, MSGL_V, "demux_aac_probe, INIT: %"PRIu64", PROBED: %"PRIu64", cnt: %d\n", init, probed, cnt);
return DEMUXER_TYPE_AAC;
fail:
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c
index 7d710cd2c9..e0b44fc7db 100644
--- a/libmpdemux/demux_mkv.c
+++ b/libmpdemux/demux_mkv.c
@@ -636,7 +636,7 @@ demux_mkv_read_info (demuxer_t *demuxer)
if (num == EBML_UINT_INVALID)
return 1;
mkv_d->tc_scale = num;
- mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + timecode scale: %llu\n",
+ mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + timecode scale: %"PRIu64"\n",
mkv_d->tc_scale);
break;
}
@@ -1262,7 +1262,7 @@ demux_mkv_read_cues (demuxer_t *demuxer)
mkv_d->indexes[mkv_d->num_indexes].timecode = time;
mkv_d->indexes[mkv_d->num_indexes].filepos =mkv_d->segment_start+pos;
mp_msg (MSGT_DEMUX, MSGL_DBG2, "[mkv] |+ found cue point "
- "for track %llu: timecode %llu, filepos: %llu\n",
+ "for track %"PRIu64": timecode %"PRIu64", filepos: %"PRIu64"\n",
track, time, mkv_d->segment_start + pos);
mkv_d->num_indexes++;
}
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c
index cbefbd55c6..e5ddc80be8 100644
--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -665,7 +665,7 @@ void demux_ogg_scan_stream(demuxer_t* demuxer) {
if(index_mode == 2) mp_msg(MSGT_DEMUX,MSGL_INFO,"\n");
if(index_mode == 2) mp_msg(MSGT_DEMUX,MSGL_V,"Ogg syncpoints table builed: %d syncpoints\n",ogg_d->num_syncpoint);
- mp_msg(MSGT_DEMUX,MSGL_V,"Ogg stream length (granulepos): %lld\n",ogg_d->final_granulepos);
+ mp_msg(MSGT_DEMUX,MSGL_V,"Ogg stream length (granulepos): %"PRId64"\n",ogg_d->final_granulepos);
stream_reset(s);
stream_seek(s,demuxer->movi_start);
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c
index 64db74838a..8e5102f91e 100644
--- a/libmpdemux/demux_ts.c
+++ b/libmpdemux/demux_ts.c
@@ -322,7 +322,7 @@ static int ts_check_file(demuxer_t * demuxer)
}
}
- mp_msg(MSGT_DEMUX, MSGL_V, "TRIED UP TO POSITION %llu, FOUND %x, packet_size= %d, SEEMS A TS? %d\n", (uint64_t) pos, c, size, is_ts);
+ mp_msg(MSGT_DEMUX, MSGL_V, "TRIED UP TO POSITION %"PRIu64", FOUND %x, packet_size= %d, SEEMS A TS? %d\n", (uint64_t) pos, c, size, is_ts);
stream_seek(demuxer->stream, pos);
if(! is_ts)
@@ -547,7 +547,7 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
has_tables = 0;
memset(pes_priv1, 0, sizeof(pes_priv1));
init_pos = stream_tell(demuxer->stream);
- mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %llu, PROG: %d\n", (uint64_t) param->probe, param->prog);
+ mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %"PRIu64", PROG: %d\n", (uint64_t) param->probe, param->prog);
while((pos <= init_pos + param->probe) && (! demuxer->stream->eof))
{
pos = stream_tell(demuxer->stream);
@@ -952,7 +952,7 @@ static demuxer_t *demux_open_ts(demuxer_t * demuxer)
}
- mp_msg(MSGT_DEMUXER,MSGL_INFO, "Opened TS demuxer, audio: %x(pid %d), video: %x(pid %d)...POS=%llu\n", params.atype, demuxer->audio->id, params.vtype, demuxer->video->id, (uint64_t) start_pos);
+ mp_msg(MSGT_DEMUXER,MSGL_INFO, "Opened TS demuxer, audio: %x(pid %d), video: %x(pid %d)...POS=%"PRIu64"\n", params.atype, demuxer->audio->id, params.vtype, demuxer->video->id, (uint64_t) start_pos);
start_pos = (start_pos <= priv->ts.packet_size ? 0 : start_pos - priv->ts.packet_size);
@@ -1154,7 +1154,7 @@ static int mp4_parse_sl_packet(pmt_t *pmt, uint8_t *buf, uint16_t packet_len, in
}
pes_es->pts = (float) v / (float) sl->ts_resolution;
- mp_msg(MSGT_DEMUXER,MSGL_DBG2, "CTS: %d bits, value: %llu/%d = %.3f\n", sl->ts_len, v, sl->ts_resolution, pes_es->pts);
+ mp_msg(MSGT_DEMUXER,MSGL_DBG2, "CTS: %d bits, value: %"PRIu64"/%d = %.3f\n", sl->ts_len, v, sl->ts_resolution, pes_es->pts);
}
@@ -1755,7 +1755,7 @@ static uint16_t parse_mp4_slconfig_descriptor(pmt_t *pmt, uint8_t *buf, int len,
else //no support for fixed durations atm
sl->timescale = sl->au_duration = sl->cts_duration = 0;
- mp_msg(MSGT_DEMUX, MSGL_V, "MP4SLCONFIG(len=0x%x), predef: %d, flags: %x, use_ts: %d, tslen: %d, timescale: %d, dts: %llu, cts: %llu\n",
+ mp_msg(MSGT_DEMUX, MSGL_V, "MP4SLCONFIG(len=0x%x), predef: %d, flags: %x, use_ts: %d, tslen: %d, timescale: %d, dts: %"PRIu64", cts: %"PRIu64"\n",
len, buf[0], sl->flags, sl->use_ts, sl->ts_len, sl->timescale, (uint64_t) sl->dts, (uint64_t) sl->cts);
return len;
diff --git a/libmpdemux/demux_ty.c b/libmpdemux/demux_ty.c
index 7a385f97c4..0ca4c03d09 100644
--- a/libmpdemux/demux_ty.c
+++ b/libmpdemux/demux_ty.c
@@ -240,13 +240,13 @@ int ty_tmf_filetoparts( demuxer_t *demux, TiVoInfo *tivo )
mp_msg
(
MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetoparts(): size %lld\n",
+ "tmf_filetoparts(): size %"PRId64"\n",
tivo->tmfparts[ parts ].fileSize
);
mp_msg
(
MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetoparts(): startOffset %lld\n",
+ "tmf_filetoparts(): startOffset %"PRId64"\n",
tivo->tmfparts[ parts ].startOffset
);
parts++;
@@ -283,7 +283,7 @@ int ty_tmf_filetoparts( demuxer_t *demux, TiVoInfo *tivo )
tivo->tmf_totalchunks += ( tivo->tmfparts[ index ].fileSize / CHUNKSIZE );
}
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetoparts():total size %lld\n", tivo->tmf_totalsize );
+ "tmf_filetoparts():total size %"PRId64"\n", tivo->tmf_totalsize );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
"tmf_filetoparts():total chunks %d\n", tivo->tmf_totalchunks );
@@ -317,7 +317,7 @@ void tmf_filetooffset( TiVoInfo *tivo, int chunk, off_t *offset )
mp_msg
(
MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetooffset() offset %llx\n", *offset
+ "tmf_filetooffset() offset %"PRIx64"\n", *offset
);
}
@@ -728,7 +728,7 @@ static int demux_ty_fill_buffer( demuxer_t *demux, demux_stream_t *dsds )
tivo->size = numberParts * TIVO_PART_LENGTH;
tivo->size += size;
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:Header Calc Stream Size %lld\n", tivo->size );
+ "ty:Header Calc Stream Size %"PRId64"\n", tivo->size );
}
}
}
@@ -754,13 +754,13 @@ static int demux_ty_fill_buffer( demuxer_t *demux, demux_stream_t *dsds )
// Give a clue as to where we are in the stream
// ======================================================================
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:ty header size %llx\n", tivo->size );
+ "ty:ty header size %"PRIx64"\n", tivo->size );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:ty which Chunk %llx\n", tivo->whichChunk );
+ "ty:ty which Chunk %"PRIx64"\n", tivo->whichChunk );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:file end_pos %llx\n", demux->stream->end_pos );
+ "ty:file end_pos %"PRIx64"\n", demux->stream->end_pos );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "\nty:wanted current offset %llx\n", stream_tell( demux->stream ) );
+ "\nty:wanted current offset %"PRIx64"\n", stream_tell( demux->stream ) );
if ( tivo->size > 0 )
{
@@ -826,7 +826,7 @@ static int demux_ty_fill_buffer( demuxer_t *demux, demux_stream_t *dsds )
}
}
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "\nty:actual current offset %llx\n", ( stream_tell( demux->stream ) -
+ "\nty:actual current offset %"PRIx64"\n", ( stream_tell( demux->stream ) -
0x20000 ) );
diff --git a/libmpdemux/demux_vqf.c b/libmpdemux/demux_vqf.c
index a4ab0f63fd..eafac5b7bb 100644
--- a/libmpdemux/demux_vqf.c
+++ b/libmpdemux/demux_vqf.c
@@ -143,7 +143,7 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
{
demuxer->movi_start=stream_tell(s);
demuxer->movi_end=demuxer->movi_start+chunk_size-8;
- mp_msg(MSGT_DEMUX, MSGL_V, "Found data at %llX size %llu\n",demuxer->movi_start,demuxer->movi_end);
+ mp_msg(MSGT_DEMUX, MSGL_V, "Found data at %"PRIX64" size %"PRIu64"\n",demuxer->movi_start,demuxer->movi_end);
/* Done! play it */
break;
}
diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c
index 17f32a15c4..664a6085e5 100644
--- a/libmpdemux/muxer_lavf.c
+++ b/libmpdemux/muxer_lavf.c
@@ -69,7 +69,7 @@ static int mp_write(URLContext *h, unsigned char *buf, int size)
static offset_t mp_seek(URLContext *h, offset_t pos, int whence)
{
muxer_t *muxer = (muxer_t*)h->priv_data;
- fprintf(stderr, "SEEK %llu\n", pos);
+ fprintf(stderr, "SEEK %"PRIu64"\n", (int64_t)pos);
return fseeko(muxer->file, pos, whence);
}
diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c
index d68f6c7c49..3479d921f3 100644
--- a/libmpdemux/muxer_mpeg.c
+++ b/libmpdemux/muxer_mpeg.c
@@ -863,7 +863,7 @@ static int write_mpeg_pack(muxer_t *muxer, muxer_stream_t *s, FILE *f, char *bl,
{
spriv = (muxer_headers_t *) s->priv;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nwrite_mpeg_pack(MUX=%d, len=%u, rate=%u, id=%X, pts: %llu, dts: %llu, scr: %llu, PACK_size:%u\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nwrite_mpeg_pack(MUX=%d, len=%u, rate=%u, id=%X, pts: %"PRIu64", dts: %"PRIu64", scr: %"PRIu64", PACK_size:%u\n",
priv->mux, len, muxer->sysrate, s->ckid, spriv->pts, spriv->dts, priv->scr, priv->packet_size);
//stflen is the count of stuffing bytes in the pes header itself,
@@ -1154,7 +1154,7 @@ static uint32_t dump_audio(muxer_t *muxer, muxer_stream_t *as, uint32_t abytes,
next_pts = apriv->last_pts;
apriv->last_dts = apriv->pts;
apriv->pts = next_pts;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nAUDIO: tot=%llu, sz=%u bytes, FRAMES: %llu * %u, REST: %u, DELTA_PTS: %u\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nAUDIO: tot=%"PRIu64", sz=%u bytes, FRAMES: %"PRIu64" * %u, REST: %u, DELTA_PTS: %u\n",
apriv->size, sz, num_frames, (uint32_t) apriv->frame_size, (uint32_t) rest, (uint32_t) ((num_frames * apriv->delta_pts) >> 10));
if(((priv->scr + (63000*1024)) < next_pts) && (priv->scr < apriv->pts) && (! force))
@@ -1239,11 +1239,11 @@ static uint32_t dump_audio(muxer_t *muxer, muxer_stream_t *as, uint32_t abytes,
mp_msg(MSGT_MUXER, MSGL_ERR, "\nWARNING: SCR: << APTS, DELTA=%.3lf secs, COMPENSATE=%d, BR: %d\n",
(((double) tmp)/92160000.0), apriv->compensate, apriv->bitrate);
else if(apriv->pts < priv->scr)
- mp_msg(MSGT_MUXER, MSGL_ERR, "\nERROR: SCR: %llu, APTS: %llu, DELTA=-%.3lf secs, COMPENSATE=%d, BR: %d, lens: %d/%d, frames: %d\n",
+ mp_msg(MSGT_MUXER, MSGL_ERR, "\nERROR: SCR: %"PRIu64", APTS: %"PRIu64", DELTA=-%.3lf secs, COMPENSATE=%d, BR: %d, lens: %d/%d, frames: %d\n",
priv->scr, apriv->pts, (double) ((priv->scr - apriv->pts)/92160000.0), apriv->compensate, apriv->bitrate, tlen, len, n);
}
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nWRITTEN AUDIO: %u bytes, TIMER: %.3lf, FRAMES: %llu * %u, DELTA_PTS: %.3lf\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nWRITTEN AUDIO: %u bytes, TIMER: %.3lf, FRAMES: %"PRIu64" * %u, DELTA_PTS: %.3lf\n",
len, (double) (apriv->pts/92160000), num_frames, (uint32_t) apriv->frame_size, delta_pts);
return len;
@@ -1263,7 +1263,7 @@ static void drop_delayed_audio(muxer_t *muxer, muxer_stream_t *as, int64_t size)
else
size1 = (div) * apriv->frame_size;
- mp_msg(MSGT_MUXER, MSGL_V, "SIZE1: %llu, LEN: %llu\n", size1, (uint64_t)as->b_buffer_len);
+ mp_msg(MSGT_MUXER, MSGL_V, "SIZE1: %"PRIu64", LEN: %"PRIu64"\n", size1, (uint64_t)as->b_buffer_len);
size1 = min(size1, as->b_buffer_len);
memmove(as->b_buffer, &(as->b_buffer[size]), as->b_buffer_len - size1);
as->b_buffer_len -= size1;
@@ -1272,7 +1272,7 @@ static void drop_delayed_audio(muxer_t *muxer, muxer_stream_t *as, int64_t size)
rest_pts = (double) rest / (double) apriv->bitrate;
apriv->pts += (int64_t) (92160000.0 * rest_pts);
apriv->last_pts += (int64_t) (92160000.0 * rest_pts);
- mp_msg(MSGT_MUXER, MSGL_DBG2, "DROPPED: %lld bytes, REST= %lld, REST_PTS: %.3lf, AUDIO_PTS%.3lf\n", size1, rest, rest_pts, (double) (apriv->pts/92160000.0));
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "DROPPED: %"PRId64" bytes, REST= %"PRId64", REST_PTS: %.3lf, AUDIO_PTS%.3lf\n", size1, rest, rest_pts, (double) (apriv->pts/92160000.0));
}
@@ -1283,20 +1283,20 @@ static void save_delayed_audio(muxer_t *muxer, muxer_stream_t *as, uint64_t dur)
uint64_t init_pts, last_pts; //initial value
init_pts = apriv->pts;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %llu, DIFF: %llu\n", dur, apriv->pts - init_pts);
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %"PRIu64", DIFF: %"PRIu64"\n", dur, apriv->pts - init_pts);
while(dur > apriv->pts - init_pts)
{
priv->scr = (92160000 * apriv->size) / apriv->bitrate;
last_pts = apriv->pts;
dump_audio(muxer, as, as->b_buffer_len, 0);
- mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %llu, DIFF: %llu, SCR: %llu\n", dur, apriv->pts - init_pts, priv->scr);
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %"PRIu64", DIFF: %"PRIu64", SCR: %"PRIu64"\n", dur, apriv->pts - init_pts, priv->scr);
}
//priv->init_delay_pts = last_pts;
priv->init_delay_pts = (90 * 1024 * abs(conf_init_adelay)) + apriv->init_pts - (90 * 1024 * abs(conf_init_vpts));
if(priv->init_delay_pts <= priv->scr)
priv->init_delay_pts = last_pts;
- mp_msg(MSGT_MUXER, MSGL_INFO, "INIT_VPTS: %llu (%.3lf)\n", priv->init_delay_pts, (double) (priv->init_delay_pts/92160000.0));
+ mp_msg(MSGT_MUXER, MSGL_INFO, "INIT_VPTS: %"PRIu64" (%.3lf)\n", priv->init_delay_pts, (double) (priv->init_delay_pts/92160000.0));
}
@@ -1310,7 +1310,7 @@ static inline void update_scr(muxer_priv_t *priv, uint32_t len, uint32_t totlen,
delta_scr = (uint64_t) (mult * perc);
priv->scr += delta_scr;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "UPDATE SCR TO %llu (%.3lf): mult is %.3lf, perc: %.3lf, %u/%u, delta: %llu\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "UPDATE SCR TO %"PRIu64" (%.3lf): mult is %.3lf, perc: %.3lf, %u/%u, delta: %"PRIu64"\n",
priv->scr, (double) (priv->scr/92160000.0), mult, perc, len, totlen, delta_scr);
}
@@ -2088,7 +2088,7 @@ static uint64_t fix_mp4_frame_duration(muxer_headers_t *vpriv)
mn = mx = vpriv->framebuf[0].pts;
for(i = 0; i < 3; i++)
{
- mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "PTS: %llu\n", vpriv->framebuf[i].pts);
+ mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "PTS: %"PRIu64"\n", vpriv->framebuf[i].pts);
if(vpriv->framebuf[i].pts < mn)
mn = vpriv->framebuf[i].pts;
if(vpriv->framebuf[i].pts > mx)
@@ -2100,7 +2100,7 @@ static uint64_t fix_mp4_frame_duration(muxer_headers_t *vpriv)
if((vpriv->framebuf[i].pts > mn) && (vpriv->framebuf[i].pts < mx))
md = vpriv->framebuf[i].pts;
}
- mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "MIN: %llu, mid: %llu, max: %llu\n", mn, md, mx);
+ mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "MIN: %"PRIu64", mid: %"PRIu64", max: %"PRIu64"\n", mn, md, mx);
if(mx - md > md - mn)
diff = md - mn;
@@ -2166,7 +2166,7 @@ static size_t parse_mpeg4_video(muxer_stream_t *s, muxer_priv_t *priv, muxer_hea
delta_pts = (92160000 * (int64_t) delta) / vpriv->picture.timeinc_resolution;
pt = vpriv->picture.picture_type + 1;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nTYPE: %c, RESOLUTION: %d, TEMP: %d, delta: %d, delta_pts: %lld = %.3lf, delta2: %.3lf\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nTYPE: %c, RESOLUTION: %d, TEMP: %d, delta: %d, delta_pts: %"PRId64" = %.3lf, delta2: %.3lf\n",
FTYPE(pt), vpriv->picture.timeinc_resolution, vpriv->picture.timeinc_unit, delta, delta_pts, (double) (delta_pts/92160000.0),
(double) delta / (double) vpriv->picture.timeinc_resolution);
@@ -2199,7 +2199,7 @@ static size_t parse_mpeg4_video(muxer_stream_t *s, muxer_priv_t *priv, muxer_hea
vpriv->last_pts += vpriv->frame_duration;
vpriv->last_dts = vpriv->framebuf[vpriv->framebuf_used-1].dts;
vpriv->delta_clock = ((double) vpriv->frame_duration)/92160000.0;
- mp_msg(MSGT_MUXER, MSGL_INFO, "FRAME DURATION: %llu %.3lf\n",
+ mp_msg(MSGT_MUXER, MSGL_INFO, "FRAME DURATION: %"PRIu64" %.3lf\n",
vpriv->frame_duration, (double) (vpriv->frame_duration/92160000.0));
}
}
@@ -2508,12 +2508,12 @@ static void mpegfile_write_chunk(muxer_stream_t *s,size_t len,unsigned int flags
{
if(priv->drop)
{
- mp_msg(MSGT_MUXER, MSGL_V, "\nDROPPING %llu AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
+ mp_msg(MSGT_MUXER, MSGL_V, "\nDROPPING %"PRIu64" AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
drop_delayed_audio(muxer, s, (int64_t) delay_len);
}
else
{
- mp_msg(MSGT_MUXER, MSGL_V, "\nWRITING %llu EARLY AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
+ mp_msg(MSGT_MUXER, MSGL_V, "\nWRITING %"PRIu64" EARLY AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
save_delayed_audio(muxer, s, (uint64_t) (92160000 * (-priv->init_adelay)));
}
priv->init_adelay = 0.0;
@@ -2569,7 +2569,7 @@ static void mpegfile_write_index(muxer_t *muxer)
if(priv->is_genmpeg1 || priv->is_genmpeg2)
write_mpeg_pack(muxer, NULL, muxer->file, NULL, 0, 1); //insert fake Nav Packet
- mp_msg(MSGT_MUXER, MSGL_INFO, "\nOverhead: %.3lf%% (%llu / %llu)\n", 100.0 * (double)priv->headers_size / (double)priv->data_size, priv->headers_size, priv->data_size);
+ mp_msg(MSGT_MUXER, MSGL_INFO, "\nOverhead: %.3lf%% (%"PRIu64" / %"PRIu64")\n", 100.0 * (double)priv->headers_size / (double)priv->data_size, priv->headers_size, priv->data_size);
}
static void mpegfile_write_header(muxer_t *muxer)
diff --git a/libmpdemux/network.c b/libmpdemux/network.c
index ac3ae06fe7..12982ca1d2 100644
--- a/libmpdemux/network.c
+++ b/libmpdemux/network.c
@@ -408,11 +408,7 @@ http_send_request( URL_t *url, off_t pos ) {
if(pos>0) {
// Extend http_send_request with possibility to do partial content retrieval
-#ifdef __MINGW32__
- snprintf(str, 256, "Range: bytes=%I64d-", (int64_t)pos);
-#else
- snprintf(str, 256, "Range: bytes=%lld-", (long long)pos);
-#endif
+ snprintf(str, 256, "Range: bytes=%"PRId64"-", (int64_t)pos);
http_set_field(http_hdr, str);
}
diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c
index 74bbe65992..1034781429 100644
--- a/libmpdemux/stream.c
+++ b/libmpdemux/stream.c
@@ -268,13 +268,8 @@ off_t newpos=0;
}
if(verbose>=3){
-#ifdef _LARGEFILE_SOURCE
- printf("s->pos=%llX newpos=%llX new_bufpos=%llX buflen=%X \n",
- (long long)s->pos,(long long)newpos,(long long)pos,s->buf_len);
-#else
- printf("s->pos=%X newpos=%X new_bufpos=%X buflen=%X \n",
- (unsigned int)s->pos,newpos,pos,s->buf_len);
-#endif
+ printf("s->pos=%"PRIX64" newpos=%"PRIX64" new_bufpos=%"PRIX64" buflen=%X \n",
+ (int64_t)s->pos,(int64_t)newpos,(int64_t)pos,s->buf_len);
}
pos-=newpos;
@@ -333,11 +328,7 @@ if(newpos==0 || newpos!=s->pos){
// if(pos==s->buf_len) printf("XXX Seek to last byte of file -> EOF\n");
-#ifdef _LARGEFILE_SOURCE
- mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
-#else
- mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
-#endif
+ mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos));
return 0;
}
diff --git a/libmpdemux/stream_file.c b/libmpdemux/stream_file.c
index 241c1cffa5..b6c1028f5f 100644
--- a/libmpdemux/stream_file.c
+++ b/libmpdemux/stream_file.c
@@ -140,11 +140,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
stream->type = STREAMTYPE_FILE;
}
-#ifdef _LARGEFILE_SOURCE
- mp_msg(MSGT_OPEN,MSGL_V,"[file] File size is %lld bytes\n", (long long)len);
-#else
- mp_msg(MSGT_OPEN,MSGL_V,"[file] File size is %u bytes\n", (unsigned int)len);
-#endif
+ mp_msg(MSGT_OPEN,MSGL_V,"[file] File size is %"PRId64" bytes\n", (int64_t)len);
stream->fd = f;
stream->fill_buffer = fill_buffer;
diff --git a/libmpdemux/stream_ftp.c b/libmpdemux/stream_ftp.c
index ad81300d1c..cb35a18fdc 100644
--- a/libmpdemux/stream_ftp.c
+++ b/libmpdemux/stream_ftp.c
@@ -307,11 +307,7 @@ static int seek(stream_t *s,off_t newpos) {
if(!s->fd) return 0;
if(newpos > 0) {
-#ifdef _LARGEFILE_SOURCE
- snprintf(str,255,"REST %lld\r\n",newpos);
-#else
- snprintf(str,255,"REST %u\r\n",newpos);
-#endif
+ snprintf(str,255,"REST %"PRId64"\r\n", (int64_t)newpos);
resp = FtpSendCmd(str,p,rsp_txt);
if(resp != 3) {
diff --git a/m_option.c b/m_option.c
index 135f2cee71..e595d0bb84 100644
--- a/m_option.c
+++ b/m_option.c
@@ -289,7 +289,7 @@ static int parse_position(m_option_t* opt,char *name, char *param, void* dst, in
if (param == NULL)
return M_OPT_MISSING_PARAM;
if (sscanf(param, sizeof(off_t) == sizeof(int) ?
- "%d%c" : "%lld%c", &tmp_off, &dummy) != 1) {
+ "%d%c" : "%"PRId64"%c", &tmp_off, &dummy) != 1) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",opt->name,param);
return M_OPT_INVALID;
}
@@ -297,20 +297,16 @@ static int parse_position(m_option_t* opt,char *name, char *param, void* dst, in
if (opt->flags & M_OPT_MIN)
if (tmp_off < opt->min) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
- (sizeof(off_t) == sizeof(int) ?
- "The %s option must be >= %d: %s\n" :
- "The %s option must be >= %lld: %s\n"),
- name, (off_t) opt->min, param);
+ "The %s option must be >= %"PRId64": %s\n",
+ name, (int64_t) opt->min, param);
return M_OPT_OUT_OF_RANGE;
}
if (opt->flags & M_OPT_MAX)
if (tmp_off > opt->max) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
- (sizeof(off_t) == sizeof(int) ?
- "The %s option must be <= %d: %s\n" :
- "The %s option must be <= %lld: %s\n"),
- name, (off_t) opt->max, param);
+ "The %s option must be <= %"PRId64": %s\n",
+ name, (int64_t) opt->max, param);
return M_OPT_OUT_OF_RANGE;
}
@@ -320,7 +316,7 @@ static int parse_position(m_option_t* opt,char *name, char *param, void* dst, in
}
static char* print_position(m_option_t* opt, void* val) {
- return dup_printf(sizeof(off_t) == sizeof(int) ? "%d" : "%lld",VAL(val));
+ return dup_printf("%"PRId64,(int64_t)VAL(val));
}
m_option_type_t m_option_type_position = {