[FFmpeg-devel] [PATCH] Fix printf format warnings
Eli Friedman
eli.friedman
Tue Jun 8 07:19:10 CEST 2010
Attached are fixes for printf format warnings in
libavformat/rtpdec_xiph.c and libavformat/oggdec.c. The pointer
differences in libavformat/rtpdec_xiph.c have type ptrdiff_t, and
page_pos in oggdec.c is an int64_t.
-Eli Friedman
-------------- next part --------------
Index: libavformat/rtpdec_xiph.c
===================================================================
--- libavformat/rtpdec_xiph.c (revision 23520)
+++ libavformat/rtpdec_xiph.c (working copy)
@@ -237,7 +237,7 @@
if (packed_headers_end - packed_headers < 9) {
av_log(codec, AV_LOG_ERROR,
"Invalid %d byte packed header.",
- packed_headers_end - packed_headers);
+ (int)(packed_headers_end - packed_headers));
return AVERROR_INVALIDDATA;
}
@@ -259,7 +259,7 @@
length1 > length || length2 > length - length1) {
av_log(codec, AV_LOG_ERROR,
"Bad packed header lengths (%d,%d,%d,%d)\n", length1,
- length2, packed_headers_end - packed_headers, length);
+ length2, (int)(packed_headers_end - packed_headers), length);
return AVERROR_INVALIDDATA;
}
-------------- next part --------------
Index: libavformat/oggdec.c
===================================================================
--- libavformat/oggdec.c (revision 23520)
+++ libavformat/oggdec.c (working copy)
@@ -363,7 +363,8 @@
#endif
if (os->granule == -1)
- av_log(s, AV_LOG_WARNING, "Page at %lld is missing granule\n", os->page_pos);
+ av_log(s, AV_LOG_WARNING, "Page at %lld is missing granule\n",
+ (long long)os->page_pos);
ogg->curidx = idx;
os->incomplete = 0;
More information about the ffmpeg-devel
mailing list