diff options
author | Steve L'Homme <slhomme@divxcorp.com> | 2006-11-02 01:39:58 +0300 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2006-11-02 01:39:58 +0300 |
commit | 949b1a13bf4434ade235fdcd783c5fe0d27c0c3b (patch) | |
tree | 78e083fd51f0f9cbf88b86cc2422616608c17c35 | |
parent | 523fc7c17ddd0b4e31b9fb590483ac4c34e0b5f8 (diff) |
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
-rw-r--r-- | ffmpeg.c | 10 | ||||
-rw-r--r-- | ffserver.c | 6 | ||||
-rw-r--r-- | libavcodec/dvbsubdec.c | 2 | ||||
-rw-r--r-- | libavcodec/h263.c | 4 | ||||
-rw-r--r-- | libavcodec/h263dec.c | 2 | ||||
-rw-r--r-- | libavcodec/imgresample.c | 2 | ||||
-rw-r--r-- | libavcodec/mpegvideo.c | 2 | ||||
-rw-r--r-- | libavcodec/oggvorbis.c | 2 | ||||
-rw-r--r-- | libavcodec/parser.c | 2 | ||||
-rw-r--r-- | libavcodec/ppc/dsputil_ppc.c | 2 | ||||
-rw-r--r-- | libavcodec/snow.c | 6 | ||||
-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 | ||||
-rw-r--r-- | libavutil/mathematics.c | 2 | ||||
-rw-r--r-- | libavutil/md5.c | 10 | ||||
-rw-r--r-- | pktdumper.c | 2 |
27 files changed, 84 insertions, 84 deletions
@@ -501,7 +501,7 @@ static void do_audio_out(AVFormatContext *s, assert(ost->audio_resample); if(verbose > 2) fprintf(stderr, "compensating audio timestamp drift:%f compensation:%d in:%d\n", delta, comp, enc->sample_rate); -// fprintf(stderr, "drift:%f len:%d opts:%lld ipts:%lld fifo:%d\n", delta, -1, ost->sync_opts, (int64_t)(get_sync_ipts(ost) * enc->sample_rate), av_fifo_size(&ost->fifo)/(ost->st->codec->channels * 2)); +// fprintf(stderr, "drift:%f len:%d opts:%"PRId64" ipts:%"PRId64" fifo:%d\n", delta, -1, ost->sync_opts, (int64_t)(get_sync_ipts(ost) * enc->sample_rate), av_fifo_size(&ost->fifo)/(ost->st->codec->channels * 2)); av_resample_compensate(*(struct AVResampleContext**)ost->resample, comp, enc->sample_rate); } } @@ -721,7 +721,7 @@ static void do_video_out(AVFormatContext *s, nb_frames = 0; else if (vdelta > 1.1) nb_frames = lrintf(vdelta); -//fprintf(stderr, "vdelta:%f, ost->sync_opts:%lld, ost->sync_ipts:%f nb_frames:%d\n", vdelta, ost->sync_opts, ost->sync_ipts, nb_frames); +//fprintf(stderr, "vdelta:%f, ost->sync_opts:%"PRId64", ost->sync_ipts:%f nb_frames:%d\n", vdelta, ost->sync_opts, ost->sync_ipts, nb_frames); if (nb_frames == 0){ ++nb_frames_drop; if (verbose>2) @@ -821,7 +821,7 @@ static void do_video_out(AVFormatContext *s, // big_picture.pts = AV_NOPTS_VALUE; big_picture.pts= ost->sync_opts; // big_picture.pts= av_rescale(ost->sync_opts, AV_TIME_BASE*(int64_t)enc->time_base.num, enc->time_base.den); -//av_log(NULL, AV_LOG_DEBUG, "%lld -> encoder\n", ost->sync_opts); +//av_log(NULL, AV_LOG_DEBUG, "%"PRId64" -> encoder\n", ost->sync_opts); ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, &big_picture); @@ -835,7 +835,7 @@ static void do_video_out(AVFormatContext *s, pkt.size= ret; if(enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE) pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); -/*av_log(NULL, AV_LOG_DEBUG, "encoder -> %lld/%lld\n", +/*av_log(NULL, AV_LOG_DEBUG, "encoder -> %"PRId64"/%"PRId64"\n", pkt.pts != AV_NOPTS_VALUE ? av_rescale(pkt.pts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1, pkt.dts != AV_NOPTS_VALUE ? av_rescale(pkt.dts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1);*/ @@ -1924,7 +1924,7 @@ static int av_encode(AVFormatContext **output_files, if (ist->discard) goto discard_packet; -// fprintf(stderr, "next:%lld dts:%lld off:%lld %d\n", ist->next_pts, pkt.dts, input_files_ts_offset[ist->file_index], ist->st->codec->codec_type); +// fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n", ist->next_pts, pkt.dts, input_files_ts_offset[ist->file_index], ist->st->codec->codec_type); if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE) { int64_t delta= av_rescale_q(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q) - ist->next_pts; if(FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE && !copy_ts){ diff --git a/ffserver.c b/ffserver.c index 144e100ee9..3c94a28749 100644 --- a/ffserver.c +++ b/ffserver.c @@ -1790,7 +1790,7 @@ static void compute_stats(HTTPContext *c) avg = fdata->avg_frame_size * (float)enc->rate * 8.0; if (enc->codec->type == CODEC_TYPE_AUDIO && enc->frame_size > 0) avg /= enc->frame_size; - url_fprintf(pb, "<TR><TD>%s <TD> %d <TD> %Ld <TD> %0.1f\n", + url_fprintf(pb, "<TR><TD>%s <TD> %d <TD> %"PRId64" <TD> %0.1f\n", buf, enc->frame_number, fdata->data_count, avg / 1000.0); } url_fprintf(pb, "</TABLE>\n"); @@ -1912,7 +1912,7 @@ static int open_input_stream(HTTPContext *c, const char *info) #if 0 { time_t when = stream_pos / 1000000; - http_log("Stream pos = %lld, time=%s", stream_pos, ctime(&when)); + http_log("Stream pos = %"PRId64", time=%s", stream_pos, ctime(&when)); } #endif @@ -2401,7 +2401,7 @@ static int http_receive_data(HTTPContext *c) if header */ if (c->data_count > FFM_PACKET_SIZE) { - // printf("writing pos=0x%Lx size=0x%Lx\n", feed->feed_write_index, feed->feed_size); + // printf("writing pos=0x%"PRIx64" size=0x%"PRIx64"\n", feed->feed_write_index, feed->feed_size); /* XXX: use llseek or url_seek */ lseek(c->feed_fd, feed->feed_write_index, SEEK_SET); write(c->feed_fd, c->buffer, FFM_PACKET_SIZE); diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index ba67ad1617..87f7cbe427 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -1493,7 +1493,7 @@ static int dvbsub_parse(AVCodecParserContext *s, int len, buf_pos = 0; #ifdef DEBUG - av_log(avctx, AV_LOG_INFO, "DVB parse packet pts=%Lx, lpts=%Lx, cpts=%Lx:\n", + av_log(avctx, AV_LOG_INFO, "DVB parse packet pts=%"PRIx64", lpts=%"PRIx64", cpts=%"PRIx64":\n", s->pts, s->last_pts, s->cur_frame_pts[s->cur_frame_start_index]); #endif diff --git a/libavcodec/h263.c b/libavcodec/h263.c index a6adb8777c..e5c723828c 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -5912,7 +5912,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ s->pb_field_time= ( ROUNDED_DIV(s->time, s->t_frame) - ROUNDED_DIV(s->last_non_b_time - s->pp_time, s->t_frame))*2; } -//av_log(s->avctx, AV_LOG_DEBUG, "last nonb %Ld last_base %d time %Ld pp %d pb %d t %d ppf %d pbf %d\n", s->last_non_b_time, s->last_time_base, s->time, s->pp_time, s->pb_time, s->t_frame, s->pp_field_time, s->pb_field_time); +//av_log(s->avctx, AV_LOG_DEBUG, "last nonb %"PRId64" last_base %d time %"PRId64" pp %d pb %d t %d ppf %d pbf %d\n", s->last_non_b_time, s->last_time_base, s->time, s->pp_time, s->pb_time, s->t_frame, s->pp_field_time, s->pb_field_time); if(s->avctx->time_base.num) s->current_picture_ptr->pts= (s->time + s->avctx->time_base.num/2) / s->avctx->time_base.num; @@ -5929,7 +5929,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ av_log(s->avctx, AV_LOG_ERROR, "vop not coded\n"); return FRAME_SKIPPED; } -//printf("time %d %d %d || %Ld %Ld %Ld\n", s->time_increment_bits, s->avctx->time_base.den, s->time_base, +//printf("time %d %d %d || %"PRId64" %"PRId64" %"PRId64"\n", s->time_increment_bits, s->avctx->time_base.den, s->time_base, //s->time, s->last_non_b_time, s->last_non_b_time - s->pp_time); if (s->shape != BIN_ONLY_SHAPE && ( s->pict_type == P_TYPE || (s->pict_type == S_TYPE && s->vol_sprite_usage==GMC_SPRITE))) { diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index eb32853368..d691073e8b 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -798,7 +798,7 @@ assert(s->current_picture.pict_type == s->pict_type); avctx->frame_number = s->picture_number - 1; #ifdef PRINT_FRAME_TIME -av_log(avctx, AV_LOG_DEBUG, "%Ld\n", rdtsc()-time); +av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); #endif return get_consumed_bytes(s, buf_size); diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c index 82a1d958b8..ce1a05ce4b 100644 --- a/libavcodec/imgresample.c +++ b/libavcodec/imgresample.c @@ -171,7 +171,7 @@ static void v_resample(uint8_t *dst, int dst_width, const uint8_t *src, src_pos += src_incr;\ } -#define DUMP(reg) movq_r2m(reg, tmp); printf(#reg "=%016Lx\n", tmp.uq); +#define DUMP(reg) movq_r2m(reg, tmp); printf(#reg "=%016"PRIx64"\n", tmp.uq); /* XXX: do four pixels at a time */ static void h_resample_fast4_mmx(uint8_t *dst, int dst_width, diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 6f9168f06f..dd5565d424 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2333,7 +2333,7 @@ static void select_input_picture(MpegEncContext *s){ if(s->avctx->frame_skip_threshold || s->avctx->frame_skip_factor){ if(s->picture_in_gop_number < s->gop_size && skip_check(s, s->input_picture[0], s->next_picture_ptr)){ //FIXME check that te gop check above is +-1 correct -//av_log(NULL, AV_LOG_DEBUG, "skip %p %Ld\n", s->input_picture[0]->data[0], s->input_picture[0]->pts); +//av_log(NULL, AV_LOG_DEBUG, "skip %p %"PRId64"\n", s->input_picture[0]->data[0], s->input_picture[0]->pts); if(s->input_picture[0]->type == FF_BUFFER_TYPE_SHARED){ for(i=0; i<4; i++) diff --git a/libavcodec/oggvorbis.c b/libavcodec/oggvorbis.c index 38aad2198a..9e684a0f49 100644 --- a/libavcodec/oggvorbis.c +++ b/libavcodec/oggvorbis.c @@ -334,7 +334,7 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, op->packet = buf; op->bytes = buf_size; -// av_log(avccontext, AV_LOG_DEBUG, "%d %d %d %lld %lld %d %d\n", op->bytes, op->b_o_s, op->e_o_s, op->granulepos, op->packetno, buf_size, context->vi.rate); +// av_log(avccontext, AV_LOG_DEBUG, "%d %d %d %"PRId64" %"PRId64" %d %d\n", op->bytes, op->b_o_s, op->e_o_s, op->granulepos, op->packetno, buf_size, context->vi.rate); /* for(i=0; i<op->bytes; i++) av_log(avccontext, AV_LOG_DEBUG, "%02X ", op->packet[i]); diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 6fabdf650a..fc373cebe2 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -127,7 +127,7 @@ int av_parser_parse(AVCodecParserContext *s, /* WARNING: the returned index can be negative */ index = s->parser->parser_parse(s, avctx, poutbuf, poutbuf_size, buf, buf_size); -//av_log(NULL, AV_LOG_DEBUG, "parser: in:%lld, %lld, out:%lld, %lld, in:%d out:%d id:%d\n", pts, dts, s->last_pts, s->last_dts, buf_size, *poutbuf_size, avctx->codec_id); +//av_log(NULL, AV_LOG_DEBUG, "parser: in:%"PRId64", %"PRId64", out:%"PRId64", %"PRId64", in:%d out:%d id:%d\n", pts, dts, s->last_pts, s->last_dts, buf_size, *poutbuf_size, avctx->codec_id); /* update the file pointer */ if (*poutbuf_size) { /* fill the data for the current frame */ diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index b8502a0dd2..95b69f45ba 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -101,7 +101,7 @@ void powerpc_display_perf_report(void) { if (perfdata[j][i][powerpc_data_num] != (unsigned long long)0) av_log(NULL, AV_LOG_INFO, - " Function \"%s\" (pmc%d):\n\tmin: %llu\n\tmax: %llu\n\tavg: %1.2lf (%llu)\n", + " Function \"%s\" (pmc%d):\n\tmin: %"PRIu64"\n\tmax: %"PRIu64"\n\tavg: %1.2lf (%"PRIu64")\n", perfname[i], j+1, perfdata[j][i][powerpc_data_min], diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 9e31a1fc96..9d1eec1e81 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -4616,7 +4616,7 @@ int64_t g=0; for(x=0; x<width; x++){ int64_t d= buffer[0][x + y*width]; error += d*d; - if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9 && level==2) printf("%8lld ", d); + if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9 && level==2) printf("%8"PRId64" ", d); } if(FFABS(height/2-y)<9 && level==2) printf("\n"); } @@ -4630,7 +4630,7 @@ int64_t g=0; for(level=0; level<s.spatial_decomposition_count; level++){ printf(" {"); for(orientation=0; orientation<4; orientation++){ - printf("%8lld,", errors[level][orientation]/g); + printf("%8"PRId64",", errors[level][orientation]/g); } printf("},\n"); } @@ -4669,7 +4669,7 @@ int64_t g=0; for(x=0; x<width; x++){ int64_t d= buffer[0][x + y*width]; error += d*d; - if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9) printf("%8lld ", d); + if(FFABS(width/2-x)<9 && FFABS(height/2-y)<9) printf("%8"PRId64" ", d); } if(FFABS(height/2-y)<9) printf("\n"); } 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; diff --git a/libavutil/mathematics.c b/libavutil/mathematics.c index c43c64ba21..4be027d9da 100644 --- a/libavutil/mathematics.c +++ b/libavutil/mathematics.c @@ -131,7 +131,7 @@ main(){ if((double)a * (double)b / (double)c > (1LL<<63)) continue; - if(d!=e) printf("%Ld*%Ld/%Ld= %Ld=%Ld\n", a, b, c, d, e); + if(d!=e) printf("%"PRId64"*%"PRId64"/%"PRId64"= %"PRId64"=%"PRId64"\n", a, b, c, d, e); } } } diff --git a/libavutil/md5.c b/libavutil/md5.c index 3f116d36cc..d33ad14830 100644 --- a/libavutil/md5.c +++ b/libavutil/md5.c @@ -176,11 +176,11 @@ main(){ uint8_t in[1000]; for(i=0; i<1000; i++) in[i]= i*i; - av_md5_sum( (uint8_t*)&md5val, in, 1000); printf("%lld\n", md5val); - av_md5_sum( (uint8_t*)&md5val, in, 63); printf("%lld\n", md5val); - av_md5_sum( (uint8_t*)&md5val, in, 64); printf("%lld\n", md5val); - av_md5_sum( (uint8_t*)&md5val, in, 65); printf("%lld\n", md5val); + av_md5_sum( (uint8_t*)&md5val, in, 1000); printf("%"PRId64"\n", md5val); + av_md5_sum( (uint8_t*)&md5val, in, 63); printf("%"PRId64"\n", md5val); + av_md5_sum( (uint8_t*)&md5val, in, 64); printf("%"PRId64"\n", md5val); + av_md5_sum( (uint8_t*)&md5val, in, 65); printf("%"PRId64"\n", md5val); for(i=0; i<1000; i++) in[i]= i % 127; - av_md5_sum( (uint8_t*)&md5val, in, 999); printf("%lld\n", md5val); + av_md5_sum( (uint8_t*)&md5val, in, 999); printf("%"PRId64"\n", md5val); } #endif diff --git a/pktdumper.c b/pktdumper.c index 701e8014d0..3535fd03fb 100644 --- a/pktdumper.c +++ b/pktdumper.c @@ -6,7 +6,7 @@ #include <string.h> #include <unistd.h> -#define PKTFILESUFF "_%08Ld_%02d_%010Ld_%06d_%c.bin" +#define PKTFILESUFF "_%08"PRId64"_%02d_%010"PRId64"_%06d_%c.bin" static int usage(int ret) { |