summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-04-01 18:19:59 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-04-02 00:27:22 +0200
commitcba4e6062a02d5bf684e13a770be88aa1fec717e (patch)
treecf0ecd5a96c69be36b166d68356c64f637893fbd /libavformat
parent80035db88c1f7cc23110c7472a2b13a4d2d8b73e (diff)
More correct printf format specifiers
This avoids compiler warnings about argument and specifier type mismatch.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c2
-rw-r--r--libavformat/movenc.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5d0719c057..afd3fc6638 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1343,7 +1343,7 @@ static int mov_rewrite_dvd_sub_extradata(AVStream *st)
uint32_t yuv = AV_RB32(src + i * 4);
uint32_t rgba = yuv_to_rgba(yuv);
- av_strlcatf(buf, sizeof(buf), "%06x%s", rgba, i != 15 ? ", " : "");
+ av_strlcatf(buf, sizeof(buf), "%06"PRIx32"%s", rgba, i != 15 ? ", " : "");
}
if (av_strlcat(buf, "\n", sizeof(buf)) >= sizeof(buf))
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 889f15c8e9..afc73cae63 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -22,6 +22,7 @@
*/
#include <stdint.h>
+#include <inttypes.h>
#include "movenc.h"
#include "avformat.h"
@@ -3216,8 +3217,10 @@ static int mov_create_dvd_sub_decoder_specific_info(MOVTrack *track,
if (strncmp("palette:", cur, 8) == 0) {
int i, count;
count = sscanf(cur + 8,
- "%06x, %06x, %06x, %06x, %06x, %06x, %06x, %06x, "
- "%06x, %06x, %06x, %06x, %06x, %06x, %06x, %06x",
+ "%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32", "
+ "%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32", "
+ "%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32", "
+ "%06"PRIx32", %06"PRIx32", %06"PRIx32", %06"PRIx32"",
&palette[ 0], &palette[ 1], &palette[ 2], &palette[ 3],
&palette[ 4], &palette[ 5], &palette[ 6], &palette[ 7],
&palette[ 8], &palette[ 9], &palette[10], &palette[11],