[Ffmpeg-cvslog] CVS: ffmpeg/libavformat asf.c, 1.86, 1.87 crc.c, 1.10, 1.11 matroska.c, 1.15, 1.16 mov.c, 1.93, 1.94 nsvdec.c, 1.10, 1.11 nut.c, 1.56, 1.57 sierravmd.c, 1.9, 1.10 utils.c, 1.168, 1.169

Måns Rullgård CVS mru
Mon Dec 12 02:56:49 CET 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv19337/libavformat

Modified Files:
	asf.c crc.c matroska.c mov.c nsvdec.c nut.c sierravmd.c 
	utils.c 
Log Message:
use PRIxN, %zd, %td formats where needed


Index: asf.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/asf.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- asf.c	26 Oct 2005 12:15:09 -0000	1.86
+++ asf.c	12 Dec 2005 01:56:46 -0000	1.87
@@ -430,7 +430,7 @@
     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) {

Index: crc.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/crc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- crc.c	5 Nov 2005 00:10:22 -0000	1.10
+++ crc.c	12 Dec 2005 01:56:46 -0000	1.11
@@ -94,7 +94,7 @@
     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;

Index: matroska.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/matroska.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- matroska.c	19 Jul 2005 15:32:43 -0000	1.15
+++ matroska.c	12 Dec 2005 01:56:46 -0000	1.16
@@ -379,7 +379,7 @@
         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 @@
     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 @@
     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 @@
     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 @@
     } 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 @@
     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 @@
     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 @@
                     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 @@
                     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 @@
                     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 @@
 
                 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 @@
                         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 @@
     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))) {

Index: mov.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/mov.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- mov.c	18 Oct 2005 20:16:43 -0000	1.93
+++ mov.c	12 Dec 2005 01:56:46 -0000	1.94
@@ -1749,7 +1749,7 @@
     /* 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;
     }

Index: nsvdec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/nsvdec.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- nsvdec.c	14 Aug 2005 15:42:40 -0000	1.10
+++ nsvdec.c	12 Dec 2005 01:56:46 -0000	1.11
@@ -236,7 +236,7 @@
     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 @@
     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 @@
     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 @@
     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)

Index: nut.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/nut.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- nut.c	23 Sep 2005 00:25:41 -0000	1.56
+++ nut.c	12 Dec 2005 01:56:46 -0000	1.57
@@ -868,7 +868,7 @@
 
     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 @@
         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 @@
                 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 @@
     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 @@
             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;
 

Index: sierravmd.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/sierravmd.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- sierravmd.c	17 Jul 2005 22:24:36 -0000	1.9
+++ sierravmd.c	12 Dec 2005 01:56:46 -0000	1.10
@@ -290,7 +290,7 @@
             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));

Index: utils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/utils.c,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- utils.c	4 Nov 2005 23:50:11 -0000	1.168
+++ utils.c	12 Dec 2005 01:56:46 -0000	1.169
@@ -1274,7 +1274,7 @@
         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 @@
             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 @@
             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 @@
     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 @@
         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 @@
     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 @@
     }
     
     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){





More information about the ffmpeg-cvslog mailing list