diff options
author | Steve L'Homme <slhomme@divxcorp.com> | 2006-11-01 22:39:58 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2006-11-01 22:39:58 +0000 |
commit | 949b1a13bf4434ade235fdcd783c5fe0d27c0c3b (patch) | |
tree | 78e083fd51f0f9cbf88b86cc2422616608c17c35 /libavformat | |
parent | 523fc7c17ddd0b4e31b9fb590483ac4c34e0b5f8 (diff) | |
download | ffmpeg-949b1a13bf4434ade235fdcd783c5fe0d27c0c3b.tar.gz |
Replace most of the %lld and %llx by their (cleaner) PRI*64 counterparts.
patch by Steve Lhomme, slhomme divxcorp com
Originally committed as revision 6868 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asf.c | 10 | ||||
-rw-r--r-- | libavformat/avidec.c | 22 | ||||
-rw-r--r-- | libavformat/avienc.c | 4 | ||||
-rw-r--r-- | libavformat/ffm.c | 6 | ||||
-rw-r--r-- | libavformat/flvenc.c | 2 | ||||
-rw-r--r-- | libavformat/ipmovie.c | 4 | ||||
-rw-r--r-- | libavformat/mov.c | 12 | ||||
-rw-r--r-- | libavformat/mpeg.c | 6 | ||||
-rw-r--r-- | libavformat/nut.c | 26 | ||||
-rw-r--r-- | libavformat/ogg.c | 2 | ||||
-rw-r--r-- | libavformat/rm.c | 4 | ||||
-rw-r--r-- | libavformat/rtp.c | 2 | ||||
-rw-r--r-- | libavformat/utils.c | 14 |
13 files changed, 57 insertions, 57 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 712c41911f..cecce7f320 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -167,9 +167,9 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) get_guid(pb, &g); gsize = get_le64(pb); #ifdef DEBUG - printf("%08Lx: ", url_ftell(pb) - 24); + printf("%08"PRIx64": ", url_ftell(pb) - 24); print_guid(&g); - printf(" size=0x%Lx\n", gsize); + printf(" size=0x%"PRIx64"\n", gsize); #endif if (gsize < 24) goto fail; @@ -512,7 +512,7 @@ static int asf_get_packet(AVFormatContext *s) rsize+=2; /* }else{ if (!url_feof(pb)) - printf("ff asf bad header %x at:%lld\n", c, url_ftell(pb)); + printf("ff asf bad header %x at:%"PRId64"\n", c, url_ftell(pb)); return AVERROR_IO;*/ } @@ -566,7 +566,7 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) || asf->packet_segments < 1) { //asf->packet_size_left <= asf->packet_padsize) { int ret = asf->packet_size_left + asf->packet_padsize; - //printf("PacketLeftSize:%d Pad:%d Pos:%Ld\n", asf->packet_size_left, asf->packet_padsize, url_ftell(pb)); + //printf("PacketLeftSize:%d Pad:%d Pos:%"PRId64"\n", asf->packet_size_left, asf->packet_padsize, url_ftell(pb)); if((url_ftell(&s->pb) + ret - s->data_offset) % asf->packet_size) ret += asf->packet_size - ((url_ftell(&s->pb) + ret - s->data_offset) % asf->packet_size); assert(ret>=0); @@ -845,7 +845,7 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos, } *ppos= pos; -//printf("found keyframe at %Ld stream %d stamp:%Ld\n", *ppos, stream_index, pts); +//printf("found keyframe at %"PRId64" stream %d stamp:%"PRId64"\n", *ppos, stream_index, pts); return pts; } diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 542c01b8ff..457cda87d5 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -105,7 +105,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){ int64_t filesize= url_fsize(&s->pb); #ifdef DEBUG_SEEK - av_log(s, AV_LOG_ERROR, "longs_pre_entry:%d index_type:%d entries_in_use:%d chunk_id:%X base:%16LX\n", + av_log(s, AV_LOG_ERROR, "longs_pre_entry:%d index_type:%d entries_in_use:%d chunk_id:%X base:%16"PRIX64"\n", longs_pre_entry,index_type, entries_in_use, chunk_id, base); #endif @@ -140,7 +140,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){ len &= 0x7FFFFFFF; #ifdef DEBUG_SEEK - av_log(s, AV_LOG_ERROR, "pos:%Ld, len:%X\n", pos, len); + av_log(s, AV_LOG_ERROR, "pos:%"PRId64", len:%X\n", pos, len); #endif if(last_pos == pos || pos == base - 8) avi->non_interleaved= 1; @@ -249,7 +249,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) if(size) avi->movi_end = avi->movi_list + size + (size & 1); else avi->movi_end = url_fsize(pb); #ifdef DEBUG - printf("movi end=%Lx\n", avi->movi_end); + printf("movi end=%"PRIx64"\n", avi->movi_end); #endif goto end_of_header; } @@ -544,7 +544,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) ts /= ast->sample_size; ts= av_rescale(ts, AV_TIME_BASE * (int64_t)st->time_base.num, st->time_base.den); -// av_log(NULL, AV_LOG_DEBUG, "%Ld %d/%d %Ld\n", ts, st->time_base.num, st->time_base.den, ast->frame_offset); +// av_log(NULL, AV_LOG_DEBUG, "%"PRId64" %d/%d %"PRId64"\n", ts, st->time_base.num, st->time_base.den, ast->frame_offset); if(ts < best_ts){ best_ts= ts; best_st= st; @@ -563,7 +563,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) int64_t pos= best_st->index_entries[i].pos; pos += best_ast->packet_size - best_ast->remaining; url_fseek(&s->pb, pos + 8, SEEK_SET); -// av_log(NULL, AV_LOG_DEBUG, "pos=%Ld\n", pos); +// av_log(NULL, AV_LOG_DEBUG, "pos=%"PRId64"\n", pos); assert(best_ast->remaining <= best_ast->packet_size); @@ -603,7 +603,7 @@ resync: // pkt->dts += ast->start; if(ast->sample_size) pkt->dts /= ast->sample_size; -//av_log(NULL, AV_LOG_DEBUG, "dts:%Ld offset:%Ld %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size); +//av_log(NULL, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size); pkt->stream_index = avi->stream_index; if (st->codec->codec_type == CODEC_TYPE_VIDEO) { @@ -668,7 +668,7 @@ resync: }else{ n= 100; //invalid stream id } -//av_log(NULL, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %lld %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n); +//av_log(NULL, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n); if(i + size > avi->movi_end || d[0]<0) continue; @@ -795,7 +795,7 @@ static int avi_read_idx1(AVFormatContext *s, int size) ast = st->priv_data; #if defined(DEBUG_SEEK) - av_log(NULL, AV_LOG_DEBUG, "%d cum_len=%Ld\n", len, ast->cum_len); + av_log(NULL, AV_LOG_DEBUG, "%d cum_len=%"PRId64"\n", len, ast->cum_len); #endif if(last_pos == pos) avi->non_interleaved= 1; @@ -839,7 +839,7 @@ static int avi_load_index(AVFormatContext *s) url_fseek(pb, avi->movi_end, SEEK_SET); #ifdef DEBUG_SEEK - printf("movi_end=0x%llx\n", avi->movi_end); + printf("movi_end=0x%"PRIx64"\n", avi->movi_end); #endif for(;;) { if (url_feof(pb)) @@ -896,7 +896,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp pos = st->index_entries[index].pos; timestamp = st->index_entries[index].timestamp; -// av_log(NULL, AV_LOG_DEBUG, "XX %Ld %d %Ld\n", timestamp, index, st->index_entries[index].timestamp); +// av_log(NULL, AV_LOG_DEBUG, "XX %"PRId64" %d %"PRId64"\n", timestamp, index, st->index_entries[index].timestamp); for(i = 0; i < s->nb_streams; i++) { AVStream *st2 = s->streams[i]; @@ -925,7 +925,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp index++; } -// av_log(NULL, AV_LOG_DEBUG, "%Ld %d %Ld\n", timestamp, index, st2->index_entries[index].timestamp); +// av_log(NULL, AV_LOG_DEBUG, "%"PRId64" %d %"PRId64"\n", timestamp, index, st2->index_entries[index].timestamp); /* extract the current frame number */ ast2->frame_offset = st2->index_entries[index].timestamp; if(ast2->sample_size) diff --git a/libavformat/avienc.c b/libavformat/avienc.c index d893c5ab32..2966087043 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -447,7 +447,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) AVCodecContext *enc= s->streams[stream_index]->codec; int size= pkt->size; -// av_log(s, AV_LOG_DEBUG, "%lld %d %d\n", pkt->dts, avi->packet_count[stream_index], stream_index); +// av_log(s, AV_LOG_DEBUG, "%"PRId64" %d %d\n", pkt->dts, avi->packet_count[stream_index], stream_index); while(enc->block_align==0 && pkt->dts != AV_NOPTS_VALUE && pkt->dts > avi->packet_count[stream_index]){ AVPacket empty_packet; @@ -456,7 +456,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) empty_packet.data= NULL; empty_packet.stream_index= stream_index; avi_write_packet(s, &empty_packet); -// av_log(s, AV_LOG_DEBUG, "dup %lld %d\n", pkt->dts, avi->packet_count[stream_index]); +// av_log(s, AV_LOG_DEBUG, "dup %"PRId64" %d\n", pkt->dts, avi->packet_count[stream_index]); } avi->packet_count[stream_index]++; diff --git a/libavformat/ffm.c b/libavformat/ffm.c index b94452c18f..539b45d5ff 100644 --- a/libavformat/ffm.c +++ b/libavformat/ffm.c @@ -438,7 +438,7 @@ static void adjust_write_index(AVFormatContext *s) ffm->write_index += pos_max; } - //printf("Adjusted write index from %lld to %lld: pts=%0.6f\n", orig_write_index, ffm->write_index, pts / 1000000.); + //printf("Adjusted write index from %"PRId64" to %"PRId64": pts=%0.6f\n", orig_write_index, ffm->write_index, pts / 1000000.); //printf("pts range %0.6f - %0.6f\n", get_pts(s, 0) / 1000000. , get_pts(s, ffm->file_size - 2 * FFM_PACKET_SIZE) / 1000000. ); end: @@ -582,7 +582,7 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt) return -EAGAIN; } #if 0 - printf("pos=%08Lx spos=%Lx, write_index=%Lx size=%Lx\n", + printf("pos=%08"PRIx64" spos=%"PRIx64", write_index=%"PRIx64" size=%"PRIx64"\n", url_ftell(&s->pb), s->pb.pos, ffm->write_index, ffm->file_size); #endif if (ffm_read_data(s, ffm->header, FRAME_HEADER_SIZE, 1) != @@ -643,7 +643,7 @@ static void ffm_seek1(AVFormatContext *s, offset_t pos1) if (pos >= ffm->file_size) pos -= (ffm->file_size - FFM_PACKET_SIZE); #ifdef DEBUG_SEEK - printf("seek to %Lx -> %Lx\n", pos1, pos); + printf("seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos); #endif url_fseek(pb, pos, SEEK_SET); } diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 4be6b7051a..82485ceff8 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -239,7 +239,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) int size= pkt->size; int flags; -// av_log(s, AV_LOG_DEBUG, "type:%d pts: %lld size:%d\n", enc->codec_type, timestamp, size); +// av_log(s, AV_LOG_DEBUG, "type:%d pts: %"PRId64" size:%d\n", enc->codec_type, timestamp, size); if (enc->codec_type == CODEC_TYPE_VIDEO) { put_byte(pb, 9); diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c index bd0305d65c..3c04599380 100644 --- a/libavformat/ipmovie.c +++ b/libavformat/ipmovie.c @@ -156,7 +156,7 @@ static int load_ipmovie_packet(IPMVEContext *s, ByteIOContext *pb, s->audio_frame_count += (s->audio_chunk_size - 6) / s->audio_channels; - debug_ipmovie("sending audio frame with pts %lld (%d audio frames)\n", + debug_ipmovie("sending audio frame with pts %"PRId64" (%d audio frames)\n", audio_pts, s->audio_frame_count); chunk_type = CHUNK_VIDEO; @@ -190,7 +190,7 @@ static int load_ipmovie_packet(IPMVEContext *s, ByteIOContext *pb, pkt->stream_index = s->video_stream_index; pkt->pts = s->video_pts; - debug_ipmovie("sending video frame with pts %lld\n", + debug_ipmovie("sending video frame with pts %"PRId64"\n", pkt->pts); s->video_pts += s->frame_pts_inc; diff --git a/libavformat/mov.c b/libavformat/mov.c index 6eb3193269..d7ce690478 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1487,7 +1487,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) stss_index++; } sample_size = sc->sample_size > 0 ? sc->sample_size : sc->sample_sizes[current_sample]; - dprintf("AVIndex stream %d, sample %d, offset %llx, dts %lld, size %d, distance %d, keyframe %d\n", + dprintf("AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", size %d, distance %d, keyframe %d\n", st->index, current_sample, current_offset, current_dts, sample_size, distance, keyframe); av_add_index_entry(st, current_offset, current_dts, sample_size, distance, keyframe ? AVINDEX_KEYFRAME : 0); current_offset += sample_size; @@ -1532,7 +1532,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) /* check for last chunk */ if (chunk_size == INT_MAX) for (j = 0; j < mov->mdat_count; j++) { - dprintf("mdat %d, offset %llx, size %lld, current offset %llx\n", + dprintf("mdat %d, offset %"PRIx64", size %"PRId64", current offset %"PRIx64"\n", j, mov->mdat_list[j].offset, mov->mdat_list[j].size, current_offset); if (mov->mdat_list[j].offset <= current_offset && mov->mdat_list[j].offset + mov->mdat_list[j].size > current_offset) chunk_size = mov->mdat_list[j].offset + mov->mdat_list[j].size - current_offset; @@ -1558,7 +1558,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) } } } - dprintf("AVIndex stream %d, chunk %d, offset %llx, dts %lld, size %d, duration %d\n", + dprintf("AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", size %d, duration %d\n", st->index, i, current_offset, current_dts, chunk_size, chunk_duration); assert(chunk_duration % sc->time_rate == 0); current_dts += chunk_duration / sc->time_rate; @@ -1642,7 +1642,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) AVIndexEntry *current_sample = &s->streams[i]->index_entries[msc->current_sample]; int64_t dts = av_rescale(current_sample->timestamp * (int64_t)msc->time_rate, AV_TIME_BASE, msc->time_scale); - dprintf("stream %d, sample %ld, dts %lld\n", i, msc->current_sample, dts); + dprintf("stream %d, sample %ld, dts %"PRId64"\n", i, msc->current_sample, dts); if (dts < best_dts) { sample = current_sample; best_dts = dts; @@ -1690,7 +1690,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) } pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? PKT_FLAG_KEY : 0; pkt->pos = sample->pos; - dprintf("stream %d, pts %lld, dts %lld, pos 0x%llx, duration %d\n", pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration); + dprintf("stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n", pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration); return 0; } @@ -1701,7 +1701,7 @@ static int mov_seek_stream(AVStream *st, int64_t timestamp, int flags) int i; sample = av_index_search_timestamp(st, timestamp, flags); - dprintf("stream %d, timestamp %lld, sample %d\n", st->index, timestamp, sample); + dprintf("stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample); if (sample < 0) /* not sure what to do */ return -1; sc->current_sample = sample; diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 3607083d16..709ce16f18 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -1453,7 +1453,7 @@ static int mpegps_read_pes_header(AVFormatContext *s, m->header_state = 0xff; size = MAX_SYNC_SIZE; startcode = find_next_start_code(&s->pb, &size, &m->header_state); - //printf("startcode=%x pos=0x%Lx\n", startcode, url_ftell(&s->pb)); + //printf("startcode=%x pos=0x%"PRIx64"\n", startcode, url_ftell(&s->pb)); if (startcode < 0) return AVERROR_IO; if (startcode == PACK_START_CODE) @@ -1709,7 +1709,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index, pos = *ppos; #ifdef DEBUG_SEEK - printf("read_dts: pos=0x%llx next=%d -> ", pos, find_next); + printf("read_dts: pos=0x%"PRIx64" next=%d -> ", pos, find_next); #endif url_fseek(&s->pb, pos, SEEK_SET); for(;;) { @@ -1727,7 +1727,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index, url_fskip(&s->pb, len); } #ifdef DEBUG_SEEK - printf("pos=0x%llx dts=0x%llx %0.3f\n", pos, dts, dts / 90000.0); + printf("pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n", pos, dts, dts / 90000.0); #endif *ppos = pos; return dts; diff --git a/libavformat/nut.c b/libavformat/nut.c index 6a4d5b84bd..df64caf159 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -250,7 +250,7 @@ static uint64_t get_v(ByteIOContext *bc) if (tmp&0x80) val= (val<<7) + tmp - 0x80; else{ -//av_log(NULL, AV_LOG_DEBUG, "get_v()= %lld\n", (val<<7) + tmp); +//av_log(NULL, AV_LOG_DEBUG, "get_v()= %"PRId64"\n", (val<<7) + tmp); return (val<<7) + tmp; } } @@ -293,7 +293,7 @@ static uint64_t get_vb(ByteIOContext *bc){ while(i--) val = (val<<8) + get_byte(bc); -//av_log(NULL, AV_LOG_DEBUG, "get_vb()= %lld\n", val); +//av_log(NULL, AV_LOG_DEBUG, "get_vb()= %"PRId64"\n", val); return val; } @@ -301,21 +301,21 @@ static uint64_t get_vb(ByteIOContext *bc){ static inline uint64_t get_v_trace(ByteIOContext *bc, char *file, char *func, int line){ uint64_t v= get_v(bc); - printf("get_v %5lld / %llX in %s %s:%d\n", v, v, file, func, line); + printf("get_v %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); return v; } static inline int64_t get_s_trace(ByteIOContext *bc, char *file, char *func, int line){ int64_t v= get_s(bc); - printf("get_s %5lld / %llX in %s %s:%d\n", v, v, file, func, line); + printf("get_s %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); return v; } static inline uint64_t get_vb_trace(ByteIOContext *bc, char *file, char *func, int line){ uint64_t v= get_vb(bc); - printf("get_vb %5lld / %llX in %s %s:%d\n", v, v, file, func, line); + printf("get_vb %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); return v; } #define get_v(bc) get_v_trace(bc, __FILE__, __PRETTY_FUNCTION__, __LINE__) @@ -407,7 +407,7 @@ static void put_v(ByteIOContext *bc, uint64_t val) { int i; -//av_log(NULL, AV_LOG_DEBUG, "put_v()= %lld\n", val); +//av_log(NULL, AV_LOG_DEBUG, "put_v()= %"PRId64"\n", val); val &= 0x7FFFFFFFFFFFFFFFULL; // FIXME can only encode upto 63 bits currently i= get_length(val); @@ -445,19 +445,19 @@ static void put_vb(ByteIOContext *bc, uint64_t val){ #ifdef TRACE static inline void put_v_trace(ByteIOContext *bc, uint64_t v, char *file, char *func, int line){ - printf("get_v %5lld / %llX in %s %s:%d\n", v, v, file, func, line); + printf("get_v %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); put_v(bc, v); } static inline void put_s_trace(ByteIOContext *bc, int64_t v, char *file, char *func, int line){ - printf("get_s %5lld / %llX in %s %s:%d\n", v, v, file, func, line); + printf("get_s %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); put_s(bc, v); } static inline void put_vb_trace(ByteIOContext *bc, uint64_t v, char *file, char *func, int line){ - printf("get_vb %5lld / %llX in %s %s:%d\n", v, v, file, func, line); + printf("get_vb %5"PRId64" / %"PRIX64" in %s %s:%d\n", v, v, file, func, line); put_vb(bc, v); } @@ -796,7 +796,7 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt) if(frame_type==2){ best_length += 8; // startcode } - av_log(s, AV_LOG_DEBUG, "kf:%d ft:%d pt:%d fc:%2X len:%2d size:%d stream:%d flag:%d mul:%d lsb:%d s+1:%d pts_delta:%d pts:%lld fs:%lld\n", key_frame, frame_type, full_pts ? 1 : 0, frame_code, best_length, size, stream_index, flags, size_mul, size_lsb, nut->frame_code[frame_code].stream_id_plus1,(int)(pts - stream->last_pts), pts, frame_start); + av_log(s, AV_LOG_DEBUG, "kf:%d ft:%d pt:%d fc:%2X len:%2d size:%d stream:%d flag:%d mul:%d lsb:%d s+1:%d pts_delta:%d pts:%"PRId64" fs:%"PRId64"\n", key_frame, frame_type, full_pts ? 1 : 0, frame_code, best_length, size, stream_index, flags, size_mul, size_lsb, nut->frame_code[frame_code].stream_id_plus1,(int)(pts - stream->last_pts), pts, frame_start); // av_log(s, AV_LOG_DEBUG, "%d %d %d\n", stream->lru_pts_delta[0], stream->lru_pts_delta[1], stream->lru_pts_delta[2]); #endif @@ -1193,7 +1193,7 @@ static int decode_frame_header(NUTContext *nut, int *key_frame_ret, int64_t *pts } if(*key_frame_ret){ -// av_log(s, AV_LOG_DEBUG, "stream:%d start:%lld pts:%lld length:%lld\n",stream_id, frame_start, av_pts, frame_start - nut->stream[stream_id].last_sync_pos); +// av_log(s, AV_LOG_DEBUG, "stream:%d start:%"PRId64" pts:%"PRId64" length:%"PRId64"\n",stream_id, frame_start, av_pts, frame_start - nut->stream[stream_id].last_sync_pos); av_add_index_entry( s->streams[stream_id], frame_start, @@ -1211,7 +1211,7 @@ static int decode_frame_header(NUTContext *nut, int *key_frame_ret, int64_t *pts size+= size_mul*get_v(bc); #ifdef TRACE -av_log(s, AV_LOG_DEBUG, "fs:%lld fc:%d ft:%d kf:%d pts:%lld size:%d mul:%d lsb:%d flags:%d delta:%d\n", frame_start, frame_code, frame_type, *key_frame_ret, pts, size, size_mul, size_lsb, flags, time_delta); +av_log(s, AV_LOG_DEBUG, "fs:%"PRId64" fc:%d ft:%d kf:%d pts:%"PRId64" size:%d mul:%d lsb:%d flags:%d delta:%d\n", frame_start, frame_code, frame_type, *key_frame_ret, pts, size, size_mul, size_lsb, flags, time_delta); #endif if(frame_type==0 && url_ftell(bc) - nut->packet_start[2] + size > nut->max_distance){ @@ -1358,7 +1358,7 @@ av_log(s, AV_LOG_DEBUG, "read_timestamp(X,%d,%"PRId64",%"PRId64")\n", stream_ind for(i=1; i<8; i++) tmp = (tmp<<8) + get_byte(bc); } -//av_log(s, AV_LOG_DEBUG, "before switch %llX at=%lld\n", tmp, pos); +//av_log(s, AV_LOG_DEBUG, "before switch %"PRIX64" at=%"PRId64"\n", tmp, pos); switch(tmp){ case MAIN_STARTCODE: diff --git a/libavformat/ogg.c b/libavformat/ogg.c index 68c6911ca0..369fa4639d 100644 --- a/libavformat/ogg.c +++ b/libavformat/ogg.c @@ -254,7 +254,7 @@ static int ogg_read_packet(AVFormatContext *avfcontext, AVPacket *pkt) { memcpy(pkt->data, op.packet, op.bytes); if(avfcontext->streams[0]->codec.sample_rate && op.granulepos!=-1) pkt->pts= av_rescale(op.granulepos, AV_TIME_BASE, avfcontext->streams[0]->codec.sample_rate); -// printf("%lld %d %d\n", pkt->pts, (int)op.granulepos, avfcontext->streams[0]->codec.sample_rate); +// printf("%"PRId64" %d %d\n", pkt->pts, (int)op.granulepos, avfcontext->streams[0]->codec.sample_rate); return op.bytes; } diff --git a/libavformat/rm.c b/libavformat/rm.c index 6ae996102a..b4ddf1b027 100644 --- a/libavformat/rm.c +++ b/libavformat/rm.c @@ -1022,7 +1022,7 @@ resync: if (st->codec->codec_type == CODEC_TYPE_VIDEO) { if(st->codec->codec_id == CODEC_ID_RV20){ int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1); - av_log(NULL, AV_LOG_DEBUG, "%d %Ld %d\n", timestamp, timestamp*512LL/25, seq); + av_log(NULL, AV_LOG_DEBUG, "%d %"PRId64" %d\n", timestamp, timestamp*512LL/25, seq); seq |= (timestamp&~0x3FFF); if(seq - timestamp > 0x2000) seq -= 0x4000; @@ -1105,7 +1105,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index, } if((flags&2) && (seq&0x7F) == 1){ -// av_log(s, AV_LOG_DEBUG, "%d %d-%d %Ld %d\n", flags, stream_index2, stream_index, dts, seq); +// av_log(s, AV_LOG_DEBUG, "%d %d-%d %"PRId64" %d\n", flags, stream_index2, stream_index, dts, seq); av_add_index_entry(st, pos, dts, 0, 0, AVINDEX_KEYFRAME); if(stream_index2 == stream_index) break; diff --git a/libavformat/rtp.c b/libavformat/rtp.c index 3b3e60ebc5..cd77ad586c 100644 --- a/libavformat/rtp.c +++ b/libavformat/rtp.c @@ -671,7 +671,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time) { RTPDemuxContext *s = s1->priv_data; #if defined(DEBUG) - printf("RTCP: %02x %Lx %x\n", s->payload_type, ntp_time, s->timestamp); + printf("RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp); #endif put_byte(&s1->pb, (RTP_VERSION << 6)); put_byte(&s1->pb, 200); diff --git a/libavformat/utils.c b/libavformat/utils.c index d99ecc015b..52ed0185f2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -685,7 +685,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, else st->cur_dts = 0; } -// av_log(NULL, AV_LOG_DEBUG, "IN delayed:%d pts:%lld, dts:%lld cur_dts:%lld st:%d pc:%p\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts, pkt->stream_index, pc); +// av_log(NULL, AV_LOG_DEBUG, "IN delayed:%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64" st:%d pc:%p\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts, pkt->stream_index, pc); /* interpolate PTS and DTS if they are not present */ if (presentation_delayed) { /* DTS = decompression time stamp */ @@ -715,7 +715,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, int64_t new_diff= FFABS(st->cur_dts - pkt->pts); if(old_diff < new_diff && old_diff < (pkt->duration>>3)){ pkt->pts += pkt->duration; -// av_log(NULL, AV_LOG_DEBUG, "id:%d old:%Ld new:%Ld dur:%d cur:%Ld size:%d\n", pkt->stream_index, old_diff, new_diff, pkt->duration, st->cur_dts, pkt->size); +// av_log(NULL, AV_LOG_DEBUG, "id:%d old:%"PRId64" new:%"PRId64" dur:%d cur:%"PRId64" size:%d\n", pkt->stream_index, old_diff, new_diff, pkt->duration, st->cur_dts, pkt->size); } } @@ -735,7 +735,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, } st->cur_dts += pkt->duration; } -// av_log(NULL, AV_LOG_DEBUG, "OUTdelayed:%d pts:%lld, dts:%lld cur_dts:%lld\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts); +// av_log(NULL, AV_LOG_DEBUG, "OUTdelayed:%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64"\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts); /* update flags */ if (pc) { @@ -2204,7 +2204,7 @@ static int compute_pkt_fields2(AVStream *st, AVPacket *pkt){ int delay = FFMAX(st->codec->has_b_frames, !!st->codec->max_b_frames); int num, den, frame_size, i; -// av_log(NULL, AV_LOG_DEBUG, "av_write_frame: pts:%lld dts:%lld cur_dts:%lld b:%d size:%d st:%d\n", pkt->pts, pkt->dts, st->cur_dts, delay, pkt->size, pkt->stream_index); +// av_log(st->codec, AV_LOG_DEBUG, "av_write_frame: pts:%"PRId64" dts:%"PRId64" cur_dts:%"PRId64" b:%d size:%d st:%d\n", pkt->pts, pkt->dts, st->cur_dts, delay, pkt->size, pkt->stream_index); /* if(pkt->pts == AV_NOPTS_VALUE && pkt->dts == AV_NOPTS_VALUE) return -1;*/ @@ -2244,7 +2244,7 @@ static int compute_pkt_fields2(AVStream *st, AVPacket *pkt){ return -1; } -// av_log(NULL, AV_LOG_DEBUG, "av_write_frame: pts2:%lld dts2:%lld\n", pkt->pts, pkt->dts); +// av_log(NULL, AV_LOG_DEBUG, "av_write_frame: pts2:%"PRId64" dts2:%"PRId64"\n", pkt->pts, pkt->dts); st->cur_dts= pkt->dts; st->pts.val= pkt->dts; @@ -2350,7 +2350,7 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pk memset(streams, 0, sizeof(streams)); pktl= s->packet_buffer; while(pktl){ -//av_log(s, AV_LOG_DEBUG, "show st:%d dts:%lld\n", pktl->pkt.stream_index, pktl->pkt.dts); +//av_log(s, AV_LOG_DEBUG, "show st:%d dts:%"PRId64"\n", pktl->pkt.stream_index, pktl->pkt.dts); if(streams[ pktl->pkt.stream_index ] == 0) stream_count++; streams[ pktl->pkt.stream_index ]++; @@ -2407,7 +2407,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){ if(st->codec->codec_type == CODEC_TYPE_AUDIO && pkt->size==0) return 0; -//av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %Ld %Ld\n", pkt->size, pkt->dts, pkt->pts); +//av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %"PRId64" %"PRId64"\n", pkt->size, pkt->dts, pkt->pts); if(compute_pkt_fields2(st, pkt) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) return -1; |