Mercurial > libavformat.hg
changeset 1443:404048ea11bc libavformat
Replace most of the %lld and %llx by their (cleaner) PRI*64 counterparts.
patch by Steve Lhomme, slhomme divxcorp com
author | diego |
---|---|
date | Wed, 01 Nov 2006 22:39:58 +0000 |
parents | c2b748de9b35 |
children | 74cb68ad9dce |
files | asf.c avidec.c avienc.c ffm.c flvenc.c ipmovie.c mov.c mpeg.c nut.c ogg.c rm.c rtp.c utils.c |
diffstat | 13 files changed, 57 insertions(+), 57 deletions(-) [+] |
line wrap: on
line diff
--- a/asf.c Wed Nov 01 21:28:36 2006 +0000 +++ b/asf.c Wed Nov 01 22:39:58 2006 +0000 @@ -167,9 +167,9 @@ 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 @@ 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 @@ || 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 @@ } *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; }
--- a/avidec.c Wed Nov 01 21:28:36 2006 +0000 +++ b/avidec.c Wed Nov 01 22:39:58 2006 +0000 @@ -105,7 +105,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ // 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 @@ }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 @@ 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 @@ 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 @@ 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 @@ 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)
--- a/avienc.c Wed Nov 01 21:28:36 2006 +0000 +++ b/avienc.c Wed Nov 01 22:39:58 2006 +0000 @@ -447,7 +447,7 @@ 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 @@ 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]++;
--- a/ffm.c Wed Nov 01 21:28:36 2006 +0000 +++ b/ffm.c Wed Nov 01 22:39:58 2006 +0000 @@ -438,7 +438,7 @@ 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 @@ 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 @@ 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); }
--- a/flvenc.c Wed Nov 01 21:28:36 2006 +0000 +++ b/flvenc.c Wed Nov 01 22:39:58 2006 +0000 @@ -239,7 +239,7 @@ 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);
--- a/ipmovie.c Wed Nov 01 21:28:36 2006 +0000 +++ b/ipmovie.c Wed Nov 01 22:39:58 2006 +0000 @@ -156,7 +156,7 @@ 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 @@ 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;
--- a/mov.c Wed Nov 01 21:28:36 2006 +0000 +++ b/mov.c Wed Nov 01 22:39:58 2006 +0000 @@ -1487,7 +1487,7 @@ 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 @@ /* 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 @@ } } } - 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 @@ 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 @@ } 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 @@ 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;
--- a/mpeg.c Wed Nov 01 21:28:36 2006 +0000 +++ b/mpeg.c Wed Nov 01 22:39:58 2006 +0000 @@ -1453,7 +1453,7 @@ 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 @@ 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 @@ 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;
--- a/nut.c Wed Nov 01 21:28:36 2006 +0000 +++ b/nut.c Wed Nov 01 22:39:58 2006 +0000 @@ -250,7 +250,7 @@ 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 @@ 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 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 @@ { 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 @@ #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 @@ 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 @@ } 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 @@ 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 @@ 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:
--- a/ogg.c Wed Nov 01 21:28:36 2006 +0000 +++ b/ogg.c Wed Nov 01 22:39:58 2006 +0000 @@ -254,7 +254,7 @@ 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; }
--- a/rm.c Wed Nov 01 21:28:36 2006 +0000 +++ b/rm.c Wed Nov 01 22:39:58 2006 +0000 @@ -1022,7 +1022,7 @@ 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 @@ } 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;
--- a/rtp.c Wed Nov 01 21:28:36 2006 +0000 +++ b/rtp.c Wed Nov 01 22:39:58 2006 +0000 @@ -671,7 +671,7 @@ { 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);
--- a/utils.c Wed Nov 01 21:28:36 2006 +0000 +++ b/utils.c Wed Nov 01 22:39:58 2006 +0000 @@ -685,7 +685,7 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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;