mirror of https://git.ffmpeg.org/ffmpeg.git
use PRIxN, %zd, %td formats where needed
Originally committed as revision 4740 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
fccfc47533
commit
4733abcbf3
2
ffmpeg.c
2
ffmpeg.c
|
@ -2045,7 +2045,7 @@ static int av_encode(AVFormatContext **output_files,
|
|||
if(ABS(delta) > 10LL*AV_TIME_BASE && !copy_ts){
|
||||
input_files_ts_offset[ist->file_index]-= delta;
|
||||
if (verbose > 2)
|
||||
fprintf(stderr, "timestamp discontinuity %lld, new offset= %lld\n", delta, input_files_ts_offset[ist->file_index]);
|
||||
fprintf(stderr, "timestamp discontinuity %"PRId64", new offset= %"PRId64"\n", delta, input_files_ts_offset[ist->file_index]);
|
||||
for(i=0; i<file_table[file_index].nb_streams; i++){
|
||||
int index= file_table[file_index].ist_index + i;
|
||||
ist_table[index]->next_pts += delta;
|
||||
|
|
|
@ -329,7 +329,7 @@ static void log_connection(HTTPContext *c)
|
|||
if (c->suppress_log)
|
||||
return;
|
||||
|
||||
http_log("%s - - [%s] \"%s %s %s\" %d %lld\n",
|
||||
http_log("%s - - [%s] \"%s %s %s\" %d %"PRId64"\n",
|
||||
inet_ntoa(c->from_addr.sin_addr),
|
||||
ctime1(buf2), c->method, c->url,
|
||||
c->protocol, (c->http_error ? c->http_error : 200), c->data_count);
|
||||
|
@ -1584,7 +1584,7 @@ static void fmt_bytecount(ByteIOContext *pb, int64_t count)
|
|||
for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++) {
|
||||
}
|
||||
|
||||
url_fprintf(pb, "%lld%c", count, *s);
|
||||
url_fprintf(pb, "%"PRId64"%c", count, *s);
|
||||
}
|
||||
|
||||
static void compute_stats(HTTPContext *c)
|
||||
|
|
|
@ -355,7 +355,7 @@ static int decode_p_frame(FourXContext *f, uint8_t *buf, int length){
|
|||
}
|
||||
|
||||
if(bitstream_size != (get_bits_count(&f->gb)+31)/32*4)
|
||||
av_log(f->avctx, AV_LOG_ERROR, " %d %d %d bytes left\n",
|
||||
av_log(f->avctx, AV_LOG_ERROR, " %d %td %td bytes left\n",
|
||||
bitstream_size - (get_bits_count(&f->gb)+31)/32*4,
|
||||
bytestream_size - (f->bytestream - (buf + 20 + bitstream_size + wordstream_size)),
|
||||
wordstream_size - (((uint8_t*)f->wordstream) - (buf + 20 + bitstream_size))
|
||||
|
|
|
@ -208,7 +208,7 @@ static int encode_dvd_subtitles(uint8_t *outbuf, int outbuf_size,
|
|||
qq = outbuf;
|
||||
putbe16(&qq, q - outbuf);
|
||||
|
||||
av_log(NULL, AV_LOG_DEBUG, "subtitle_packet size=%d\n", q - outbuf);
|
||||
av_log(NULL, AV_LOG_DEBUG, "subtitle_packet size=%td\n", q - outbuf);
|
||||
return q - outbuf;
|
||||
}
|
||||
|
||||
|
|
|
@ -5861,7 +5861,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
|
|||
else
|
||||
s->current_picture_ptr->pts= AV_NOPTS_VALUE;
|
||||
if(s->avctx->debug&FF_DEBUG_PTS)
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "MPEG4 PTS: %Ld\n", s->current_picture_ptr->pts);
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "MPEG4 PTS: %"PRId64"\n", s->current_picture_ptr->pts);
|
||||
|
||||
check_marker(gb, "before vop_coded");
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ static inline void fill_rectangle(void *vp, int w, int h, int stride, uint32_t v
|
|||
w *= size;
|
||||
stride *= size;
|
||||
|
||||
assert((((int)vp)&(FFMIN(w, STRIDE_ALIGN)-1)) == 0);
|
||||
assert((((long)vp)&(FFMIN(w, STRIDE_ALIGN)-1)) == 0);
|
||||
assert((stride&(w-1))==0);
|
||||
//FIXME check what gcc generates for 64 bit on x86 and possibly write a 32 bit ver of it
|
||||
if(w==2 && h==2){
|
||||
|
|
|
@ -1188,7 +1188,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||
char *end= p + 1024*30;
|
||||
for(i=0; i<3; i++){
|
||||
for(j=0; j<256; j++){
|
||||
snprintf(p, end-p, "%llu ", s->stats[i][j]);
|
||||
snprintf(p, end-p, "%"PRIu64" ", s->stats[i][j]);
|
||||
p+= strlen(p);
|
||||
s->stats[i][j]= 0;
|
||||
}
|
||||
|
|
|
@ -846,7 +846,7 @@ static void ipvideo_decode_opcodes(IpvideoContext *s)
|
|||
}
|
||||
if ((s->stream_ptr != s->stream_end) &&
|
||||
(s->stream_ptr + 1 != s->stream_end)) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode finished with %d bytes left over\n",
|
||||
av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode finished with %td bytes left over\n",
|
||||
s->stream_end - s->stream_ptr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2020,7 +2020,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg){
|
|||
int64_t last= s->user_specified_pts;
|
||||
|
||||
if(time <= last){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Error, Invalid timestamp=%Ld, last=%Ld\n", pts, s->user_specified_pts);
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Error, Invalid timestamp=%"PRId64", last=%"PRId64"\n", pts, s->user_specified_pts);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -2029,7 +2029,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg){
|
|||
if(s->user_specified_pts != AV_NOPTS_VALUE){
|
||||
s->user_specified_pts=
|
||||
pts= s->user_specified_pts + 1;
|
||||
av_log(s->avctx, AV_LOG_INFO, "Warning: AVFrame.pts=? trying to guess (%Ld)\n", pts);
|
||||
av_log(s->avctx, AV_LOG_INFO, "Warning: AVFrame.pts=? trying to guess (%"PRId64")\n", pts);
|
||||
}else{
|
||||
pts= pic_arg->display_picture_number;
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ const char *av_get_string(void *obj, const char *name, AVOption **o_out, char *b
|
|||
switch(o->type){
|
||||
case FF_OPT_TYPE_FLAGS: snprintf(buf, buf_len, "0x%08X",*(int *)dst);break;
|
||||
case FF_OPT_TYPE_INT: snprintf(buf, buf_len, "%d" , *(int *)dst);break;
|
||||
case FF_OPT_TYPE_INT64: snprintf(buf, buf_len, "%Ld", *(int64_t*)dst);break;
|
||||
case FF_OPT_TYPE_INT64: snprintf(buf, buf_len, "%"PRId64, *(int64_t*)dst);break;
|
||||
case FF_OPT_TYPE_FLOAT: snprintf(buf, buf_len, "%f" , *(float *)dst);break;
|
||||
case FF_OPT_TYPE_DOUBLE: snprintf(buf, buf_len, "%f" , *(double *)dst);break;
|
||||
case FF_OPT_TYPE_RATIONAL: snprintf(buf, buf_len, "%d/%d", ((AVRational*)dst)->num, ((AVRational*)dst)->den);break;
|
||||
|
|
|
@ -208,18 +208,18 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) {
|
|||
AV_DEBUG(" %d. Codebook \n", cb);
|
||||
|
||||
if (get_bits(gb, 24)!=0x564342) {
|
||||
av_log(vc->avccontext, AV_LOG_ERROR, " %d. Codebook setup data corrupt. \n", cb);
|
||||
av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook setup data corrupt. \n", cb);
|
||||
goto error;
|
||||
}
|
||||
|
||||
codebook_setup->dimensions=get_bits(gb, 16);
|
||||
if (codebook_setup->dimensions>16) {
|
||||
av_log(vc->avccontext, AV_LOG_ERROR, " %d. Codebook's dimension is too large (%d). \n", cb, codebook_setup->dimensions);
|
||||
av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook's dimension is too large (%d). \n", cb, codebook_setup->dimensions);
|
||||
goto error;
|
||||
}
|
||||
entries=get_bits(gb, 24);
|
||||
if (entries>V_MAX_VLCS) {
|
||||
av_log(vc->avccontext, AV_LOG_ERROR, " %d. Codebook has too many entries (%d). \n", cb, entries);
|
||||
av_log(vc->avccontext, AV_LOG_ERROR, " %"PRIdFAST16". Codebook has too many entries (%"PRIdFAST32"). \n", cb, entries);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ static int asf_get_packet(AVFormatContext *s)
|
|||
c = get_byte(pb);
|
||||
if (c != 0x82) {
|
||||
if (!url_feof(pb))
|
||||
av_log(s, AV_LOG_ERROR, "ff asf bad header %x at:%lld\n", c, url_ftell(pb));
|
||||
av_log(s, AV_LOG_ERROR, "ff asf bad header %x at:%"PRId64"\n", c, url_ftell(pb));
|
||||
}
|
||||
if ((c & 0x0f) == 2) { // always true for now
|
||||
if (get_le16(pb) != 0) {
|
||||
|
|
|
@ -94,7 +94,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
|
|||
uint32_t crc = update_adler32(0, pkt->data, pkt->size);
|
||||
char buf[256];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%d, %Ld, %d, 0x%08x\n", pkt->stream_index, pkt->dts, pkt->size, crc);
|
||||
snprintf(buf, sizeof(buf), "%d, %"PRId64", %d, 0x%08x\n", pkt->stream_index, pkt->dts, pkt->size, crc);
|
||||
put_buffer(&s->pb, buf, strlen(buf));
|
||||
put_flush_packet(&s->pb);
|
||||
return 0;
|
||||
|
|
|
@ -379,7 +379,7 @@ ebml_read_num (MatroskaDemuxContext *matroska,
|
|||
if (!url_feof(pb)) {
|
||||
offset_t pos = url_ftell(pb);
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Read error at pos. %llu (0x%llx)\n",
|
||||
"Read error at pos. %"PRIu64" (0x%"PRIx64")\n",
|
||||
pos, pos);
|
||||
}
|
||||
return AVERROR_IO; /* EOS or actual I/O error */
|
||||
|
@ -393,7 +393,7 @@ ebml_read_num (MatroskaDemuxContext *matroska,
|
|||
if (read > max_size) {
|
||||
offset_t pos = url_ftell(pb) - 1;
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Invalid EBML number size tag 0x%02x at pos %llu (0x%llx)\n",
|
||||
"Invalid EBML number size tag 0x%02x at pos %"PRIu64" (0x%"PRIx64")\n",
|
||||
(uint8_t) total, pos, pos);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ ebml_read_uint (MatroskaDemuxContext *matroska,
|
|||
if (size < 1 || size > 8) {
|
||||
offset_t pos = url_ftell(pb);
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Invalid uint element size %d at position %lld (0x%llx)\n",
|
||||
"Invalid uint element size %d at position %"PRId64" (0x%"PRIx64")\n",
|
||||
size, pos, pos);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ ebml_read_sint (MatroskaDemuxContext *matroska,
|
|||
if (size < 1 || size > 8) {
|
||||
offset_t pos = url_ftell(pb);
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Invalid sint element size %d at position %lld (0x%llx)\n",
|
||||
"Invalid sint element size %d at position %"PRId64" (0x%"PRIx64")\n",
|
||||
size, pos, pos);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -620,7 +620,7 @@ ebml_read_float (MatroskaDemuxContext *matroska,
|
|||
} else{
|
||||
offset_t pos = url_ftell(pb);
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Invalid float element size %d at position %llu (0x%llx)\n",
|
||||
"Invalid float element size %d at position %"PRIu64" (0x%"PRIx64")\n",
|
||||
size, pos, pos);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -656,7 +656,7 @@ ebml_read_ascii (MatroskaDemuxContext *matroska,
|
|||
if (get_buffer(pb, (uint8_t *) *str, size) != size) {
|
||||
offset_t pos = url_ftell(pb);
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Read error at pos. %llu (0x%llx)\n", pos, pos);
|
||||
"Read error at pos. %"PRIu64" (0x%"PRIx64")\n", pos, pos);
|
||||
return AVERROR_IO;
|
||||
}
|
||||
(*str)[size] = '\0';
|
||||
|
@ -753,7 +753,7 @@ ebml_read_binary (MatroskaDemuxContext *matroska,
|
|||
if (get_buffer(pb, *binary, *size) != *size) {
|
||||
offset_t pos = url_ftell(pb);
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Read error at pos. %llu (0x%llx)\n", pos, pos);
|
||||
"Read error at pos. %"PRIu64" (0x%"PRIx64")\n", pos, pos);
|
||||
return AVERROR_IO;
|
||||
}
|
||||
|
||||
|
@ -877,7 +877,7 @@ ebml_read_header (MatroskaDemuxContext *matroska,
|
|||
return res;
|
||||
if (num > EBML_VERSION) {
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"EBML version %llu (> %d) is not supported\n",
|
||||
"EBML version %"PRIu64" (> %d) is not supported\n",
|
||||
num, EBML_VERSION);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -892,7 +892,7 @@ ebml_read_header (MatroskaDemuxContext *matroska,
|
|||
return res;
|
||||
if (num > sizeof(uint64_t)) {
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Integers of size %llu (> %d) not supported\n",
|
||||
"Integers of size %"PRIu64" (> %zd) not supported\n",
|
||||
num, sizeof(uint64_t));
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -907,7 +907,7 @@ ebml_read_header (MatroskaDemuxContext *matroska,
|
|||
return res;
|
||||
if (num > sizeof(uint32_t)) {
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"IDs of size %llu (> %u) not supported\n",
|
||||
"IDs of size %"PRIu64" (> %zu) not supported\n",
|
||||
num, sizeof(uint32_t));
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@ -1870,7 +1870,7 @@ matroska_parse_seekhead (MatroskaDemuxContext *matroska)
|
|||
|
||||
if (!seek_id || seek_pos == (uint64_t) -1) {
|
||||
av_log(matroska->ctx, AV_LOG_INFO,
|
||||
"Incomplete seekhead entry (0x%x/%llu)\n",
|
||||
"Incomplete seekhead entry (0x%x/%"PRIu64")\n",
|
||||
seek_id, seek_pos);
|
||||
break;
|
||||
}
|
||||
|
@ -1913,7 +1913,7 @@ matroska_parse_seekhead (MatroskaDemuxContext *matroska)
|
|||
if (id != seek_id) {
|
||||
av_log(matroska->ctx, AV_LOG_INFO,
|
||||
"We looked for ID=0x%x but got "
|
||||
"ID=0x%x (pos=%llu)",
|
||||
"ID=0x%x (pos=%"PRIu64")",
|
||||
seek_id, id, seek_pos +
|
||||
matroska->segment_start);
|
||||
goto finish;
|
||||
|
@ -2543,7 +2543,7 @@ matroska_parse_cluster (MatroskaDemuxContext *matroska)
|
|||
uint64_t cluster_time = 0;
|
||||
|
||||
av_log(matroska->ctx, AV_LOG_DEBUG,
|
||||
"parsing cluster at %lld\n", url_ftell(&matroska->ctx->pb));
|
||||
"parsing cluster at %"PRId64"\n", url_ftell(&matroska->ctx->pb));
|
||||
|
||||
while (res == 0) {
|
||||
if (!(id = ebml_peek_id(matroska, &matroska->level_up))) {
|
||||
|
|
|
@ -1749,7 +1749,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||
/* check MOV header */
|
||||
err = mov_read_default(mov, pb, atom);
|
||||
if (err<0 || (!mov->found_moov && !mov->found_mdat)) {
|
||||
av_log(s, AV_LOG_ERROR, "mov: header not found !!! (err:%d, moov:%d, mdat:%d) pos:%lld\n",
|
||||
av_log(s, AV_LOG_ERROR, "mov: header not found !!! (err:%d, moov:%d, mdat:%d) pos:%"PRId64"\n",
|
||||
err, mov->found_moov, mov->found_mdat, url_ftell(pb));
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ static int nsv_resync(AVFormatContext *s)
|
|||
uint32_t v = 0;
|
||||
int i;
|
||||
|
||||
PRINT(("%s(), offset = %Ld, state = %d\n", __FUNCTION__, url_ftell(pb), nsv->state));
|
||||
PRINT(("%s(), offset = %"PRId64", state = %d\n", __FUNCTION__, url_ftell(pb), nsv->state));
|
||||
|
||||
//nsv->state = NSV_UNSYNC;
|
||||
|
||||
|
@ -301,7 +301,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||
PRINT(("NSV NSVf file_size %u\n", file_size));
|
||||
|
||||
nsv->duration = duration = get_le32(pb); /* in ms */
|
||||
PRINT(("NSV NSVf duration %Ld ms\n", duration));
|
||||
PRINT(("NSV NSVf duration %"PRId64" ms\n", duration));
|
||||
// XXX: store it in AVStreams
|
||||
|
||||
strings_size = get_le32(pb);
|
||||
|
@ -312,7 +312,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||
if (url_feof(pb))
|
||||
return -1;
|
||||
|
||||
PRINT(("NSV got header; filepos %Ld\n", url_ftell(pb)));
|
||||
PRINT(("NSV got header; filepos %"PRId64"\n", url_ftell(pb)));
|
||||
|
||||
if (strings_size > 0) {
|
||||
char *strings; /* last byte will be '\0' to play safe with str*() */
|
||||
|
@ -355,17 +355,18 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||
if (url_feof(pb))
|
||||
return -1;
|
||||
|
||||
PRINT(("NSV got infos; filepos %Ld\n", url_ftell(pb)));
|
||||
PRINT(("NSV got infos; filepos %"PRId64"\n", url_ftell(pb)));
|
||||
|
||||
if (table_entries_used > 0) {
|
||||
nsv->index_entries = table_entries_used;
|
||||
if((unsigned)table_entries >= UINT_MAX / sizeof(uint32_t))
|
||||
return -1;
|
||||
nsv->nsvf_index_data = av_malloc(table_entries * sizeof(uint32_t));
|
||||
get_buffer(pb, nsv->nsvf_index_data, table_entries * sizeof(uint32_t));
|
||||
#warning "FIXME: Byteswap buffer as needed"
|
||||
get_buffer(pb, (unsigned char *)nsv->nsvf_index_data, table_entries * sizeof(uint32_t));
|
||||
}
|
||||
|
||||
PRINT(("NSV got index; filepos %Ld\n", url_ftell(pb)));
|
||||
PRINT(("NSV got index; filepos %"PRId64"\n", url_ftell(pb)));
|
||||
|
||||
#ifdef DEBUG_DUMP_INDEX
|
||||
#define V(v) ((v<0x20 || v > 127)?'.':v)
|
||||
|
|
|
@ -868,7 +868,7 @@ static int decode_main_header(NUTContext *nut){
|
|||
|
||||
tmp = get_v(bc);
|
||||
if (tmp != 2){
|
||||
av_log(s, AV_LOG_ERROR, "bad version (%Ld)\n", tmp);
|
||||
av_log(s, AV_LOG_ERROR, "bad version (%"PRId64")\n", tmp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1034,7 +1034,7 @@ static int decode_info_header(NUTContext *nut){
|
|||
if(!id)
|
||||
break;
|
||||
else if(id >= sizeof(info_table)/sizeof(info_table[0])){
|
||||
av_log(s, AV_LOG_ERROR, "info id is too large %d %d\n", id, sizeof(info_table)/sizeof(info_table[0]));
|
||||
av_log(s, AV_LOG_ERROR, "info id is too large %d %zd\n", id, sizeof(info_table)/sizeof(info_table[0]));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1297,7 +1297,7 @@ static int nut_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
break;
|
||||
default:
|
||||
resync:
|
||||
av_log(s, AV_LOG_DEBUG, "syncing from %lld\n", nut->packet_start[2]+1);
|
||||
av_log(s, AV_LOG_DEBUG, "syncing from %"PRId64"\n", nut->packet_start[2]+1);
|
||||
tmp= find_any_startcode(bc, nut->packet_start[2]+1);
|
||||
if(tmp==0)
|
||||
return -1;
|
||||
|
@ -1314,7 +1314,7 @@ static int64_t nut_read_timestamp(AVFormatContext *s, int stream_index, int64_t
|
|||
int64_t pos, pts;
|
||||
uint64_t code;
|
||||
int frame_code,step, stream_id, i,size, key_frame;
|
||||
av_log(s, AV_LOG_DEBUG, "read_timestamp(X,%d,%lld,%lld)\n", stream_index, *pos_arg, pos_limit);
|
||||
av_log(s, AV_LOG_DEBUG, "read_timestamp(X,%d,%"PRId64",%"PRId64")\n", stream_index, *pos_arg, pos_limit);
|
||||
|
||||
if(*pos_arg < 0)
|
||||
return AV_NOPTS_VALUE;
|
||||
|
@ -1381,7 +1381,7 @@ av_log(s, AV_LOG_DEBUG, "read_timestamp(X,%d,%lld,%lld)\n", stream_index, *pos_a
|
|||
return pts;
|
||||
default:
|
||||
resync:
|
||||
av_log(s, AV_LOG_DEBUG, "syncing from %lld\n", nut->packet_start[2]+1);
|
||||
av_log(s, AV_LOG_DEBUG, "syncing from %"PRId64"\n", nut->packet_start[2]+1);
|
||||
if(!find_any_startcode(bc, nut->packet_start[2]+1))
|
||||
return AV_NOPTS_VALUE;
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ static int vmd_read_packet(AVFormatContext *s,
|
|||
pkt->data, pkt->size, vmd->audio_block_align);
|
||||
|
||||
}
|
||||
av_log(NULL, AV_LOG_INFO, " dispatching %s frame with %d bytes and pts %lld (%0.1f sec)\n",
|
||||
av_log(NULL, AV_LOG_INFO, " dispatching %s frame with %d bytes and pts %"PRId64" (%0.1f sec)\n",
|
||||
(frame->frame_record[0] == 0x02) ? "video" : "audio",
|
||||
frame->frame_size + BYTES_PER_FRAME_RECORD,
|
||||
pkt->pts, (float)(pkt->pts / 90000.0));
|
||||
|
|
|
@ -1274,7 +1274,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
|
|||
return -1;
|
||||
|
||||
#ifdef DEBUG_SEEK
|
||||
av_log(s, AV_LOG_DEBUG, "read_seek: %d %lld\n", stream_index, target_ts);
|
||||
av_log(s, AV_LOG_DEBUG, "read_seek: %d %"PRId64"\n", stream_index, target_ts);
|
||||
#endif
|
||||
|
||||
ts_max=
|
||||
|
@ -1293,7 +1293,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
|
|||
pos_min= e->pos;
|
||||
ts_min= e->timestamp;
|
||||
#ifdef DEBUG_SEEK
|
||||
av_log(s, AV_LOG_DEBUG, "using cached pos_min=0x%llx dts_min=%lld\n",
|
||||
av_log(s, AV_LOG_DEBUG, "using cached pos_min=0x%"PRIx64" dts_min=%"PRId64"\n",
|
||||
pos_min,ts_min);
|
||||
#endif
|
||||
}else{
|
||||
|
@ -1309,7 +1309,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
|
|||
ts_max= e->timestamp;
|
||||
pos_limit= pos_max - e->min_distance;
|
||||
#ifdef DEBUG_SEEK
|
||||
av_log(s, AV_LOG_DEBUG, "using cached pos_max=0x%llx pos_limit=0x%llx dts_max=%lld\n",
|
||||
av_log(s, AV_LOG_DEBUG, "using cached pos_max=0x%"PRIx64" pos_limit=0x%"PRIx64" dts_max=%"PRId64"\n",
|
||||
pos_max,pos_limit, ts_max);
|
||||
#endif
|
||||
}
|
||||
|
@ -1350,7 +1350,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
|
|||
no_change=0;
|
||||
while (pos_min < pos_limit) {
|
||||
#ifdef DEBUG_SEEK
|
||||
av_log(s, AV_LOG_DEBUG, "pos_min=0x%llx pos_max=0x%llx dts_min=%lld dts_max=%lld\n",
|
||||
av_log(s, AV_LOG_DEBUG, "pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%"PRId64" dts_max=%"PRId64"\n",
|
||||
pos_min, pos_max,
|
||||
ts_min, ts_max);
|
||||
#endif
|
||||
|
@ -1380,7 +1380,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
|
|||
else
|
||||
no_change=0;
|
||||
#ifdef DEBUG_SEEK
|
||||
av_log(s, AV_LOG_DEBUG, "%Ld %Ld %Ld / %Ld %Ld %Ld target:%Ld limit:%Ld start:%Ld noc:%d\n", pos_min, pos, pos_max, ts_min, ts, ts_max, target_ts, pos_limit, start_pos, no_change);
|
||||
av_log(s, AV_LOG_DEBUG, "%"PRId64" %"PRId64" %"PRId64" / %"PRId64" %"PRId64" %"PRId64" target:%"PRId64" limit:%"PRId64" start:%"PRId64" noc:%d\n", pos_min, pos, pos_max, ts_min, ts, ts_max, target_ts, pos_limit, start_pos, no_change);
|
||||
#endif
|
||||
assert(ts != AV_NOPTS_VALUE);
|
||||
if (target_ts <= ts) {
|
||||
|
@ -1401,7 +1401,7 @@ av_log(s, AV_LOG_DEBUG, "%Ld %Ld %Ld / %Ld %Ld %Ld target:%Ld limit:%Ld start:%L
|
|||
ts_min = avif->read_timestamp(s, stream_index, &pos_min, INT64_MAX);
|
||||
pos_min++;
|
||||
ts_max = avif->read_timestamp(s, stream_index, &pos_min, INT64_MAX);
|
||||
av_log(s, AV_LOG_DEBUG, "pos=0x%llx %lld<=%lld<=%lld\n",
|
||||
av_log(s, AV_LOG_DEBUG, "pos=0x%"PRIx64" %"PRId64"<=%"PRId64"<=%"PRId64"\n",
|
||||
pos, ts_min, target_ts, ts_max);
|
||||
#endif
|
||||
/* do the seek */
|
||||
|
@ -2324,7 +2324,7 @@ static int compute_pkt_fields2(AVStream *st, AVPacket *pkt){
|
|||
}
|
||||
|
||||
if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && st->cur_dts >= pkt->dts){
|
||||
av_log(NULL, AV_LOG_ERROR, "error, non monotone timestamps %Ld >= %Ld\n", st->cur_dts, pkt->dts);
|
||||
av_log(NULL, AV_LOG_ERROR, "error, non monotone timestamps %"PRId64" >= %"PRId64"\n", st->cur_dts, pkt->dts);
|
||||
return -1;
|
||||
}
|
||||
if(pkt->dts != AV_NOPTS_VALUE && pkt->pts != AV_NOPTS_VALUE && pkt->pts < pkt->dts){
|
||||
|
|
|
@ -338,7 +338,7 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
|
|||
FILE *f;
|
||||
char fname[256];
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/fishimg%ld_%lld.ppm", ci->dir, (long)(av_gettime() / 1000000), pts);
|
||||
snprintf(fname, sizeof(fname), "%s/fishimg%ld_%"PRId64".ppm", ci->dir, (long)(av_gettime() / 1000000), pts);
|
||||
f = fopen(fname, "w");
|
||||
if (f) {
|
||||
fprintf(f, "P6 %d %d 255\n", width, height);
|
||||
|
|
Loading…
Reference in New Issue