summaryrefslogtreecommitdiff
authorJames Almer <jamrial@gmail.com>2013-04-10 07:52:08 (GMT)
committer Clément Bœsch <ubitux@gmail.com>2013-04-10 07:56:48 (GMT)
commit89388a953a51abd61efeb1d10f621d2ce408e44e (patch)
tree6c6c6f82c0fe4e46ec89f970a9c85ebcc6085d2f
parent2383068cbfac11aedd2f133b2d00b0c1cb58b5f9 (diff)
downloadffmpeg-89388a953a51abd61efeb1d10f621d2ce408e44e.zip
ffmpeg-89388a953a51abd61efeb1d10f621d2ce408e44e.tar.gz
ffmpeg-89388a953a51abd61efeb1d10f621d2ce408e44e.tar.bz2
Replace all occurrences of PRI in sscanf() calls with SCN
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat
-rw-r--r--libavformat/aqtitledec.c2
-rw-r--r--libavformat/mpeg.c2
-rw-r--r--libavformat/mpl2dec.c8
-rw-r--r--libavformat/pjsdec.c4
-rw-r--r--libavformat/rpl.c2
-rw-r--r--libswscale/swscale-test.c2
-rw-r--r--tools/seek_print.c2
7 files changed, 11 insertions, 11 deletions
diff --git a/libavformat/aqtitledec.c b/libavformat/aqtitledec.c
index 325946c..a78fd81 100644
--- a/libavformat/aqtitledec.c
+++ b/libavformat/aqtitledec.c
@@ -70,7 +70,7 @@ static int aqt_read_header(AVFormatContext *s)
line[strcspn(line, "\r\n")] = 0;
- if (sscanf(line, "-->> %"PRId64, &frame) == 1) {
+ if (sscanf(line, "-->> %"SCNd64, &frame) == 1) {
new_event = 1;
pos = avio_tell(s->pb);
if (sub) {
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 7d4785b..8f835ad 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -735,7 +735,7 @@ static int vobsub_read_header(AVFormatContext *s)
int64_t pos, timestamp;
const char *p = line + 10;
- if (sscanf(p, "%02d:%02d:%02d:%03d, filepos: %"PRIx64,
+ if (sscanf(p, "%02d:%02d:%02d:%03d, filepos: %"SCNx64,
&hh, &mm, &ss, &ms, &pos) != 5) {
av_log(s, AV_LOG_ERROR, "Unable to parse timestamp line '%s', "
"abort parsing\n", line);
diff --git a/libavformat/mpl2dec.c b/libavformat/mpl2dec.c
index ce2061b..b152cc8 100644
--- a/libavformat/mpl2dec.c
+++ b/libavformat/mpl2dec.c
@@ -40,8 +40,8 @@ static int mpl2_probe(AVProbeData *p)
const unsigned char *ptr_end = ptr + p->buf_size;
for (i = 0; i < 2; i++) {
- if (sscanf(ptr, "[%"PRId64"][%"PRId64"]%c", &start, &end, &c) != 3 &&
- sscanf(ptr, "[%"PRId64"][]%c", &start, &c) != 2)
+ if (sscanf(ptr, "[%"SCNd64"][%"SCNd64"]%c", &start, &end, &c) != 3 &&
+ sscanf(ptr, "[%"SCNd64"][]%c", &start, &c) != 2)
return 0;
ptr += strcspn(ptr, "\r\n") + 1;
if (ptr >= ptr_end)
@@ -56,13 +56,13 @@ static int read_ts(char **line, int64_t *pts_start, int *duration)
int len;
int64_t end;
- if (sscanf(*line, "[%"PRId64"][]%c%n",
+ if (sscanf(*line, "[%"SCNd64"][]%c%n",
pts_start, &c, &len) >= 2) {
*duration = -1;
*line += len - 1;
return 0;
}
- if (sscanf(*line, "[%"PRId64"][%"PRId64"]%c%n",
+ if (sscanf(*line, "[%"SCNd64"][%"SCNd64"]%c%n",
pts_start, &end, &c, &len) >= 3) {
*duration = end - *pts_start;
*line += len - 1;
diff --git a/libavformat/pjsdec.c b/libavformat/pjsdec.c
index ef2b626..a69a316 100644
--- a/libavformat/pjsdec.c
+++ b/libavformat/pjsdec.c
@@ -39,7 +39,7 @@ static int pjs_probe(AVProbeData *p)
int64_t start, end;
const unsigned char *ptr = p->buf;
- if (sscanf(ptr, "%"PRId64",%"PRId64",%c", &start, &end, &c) == 3) {
+ if (sscanf(ptr, "%"SCNd64",%"SCNd64",%c", &start, &end, &c) == 3) {
size_t q1pos = strcspn(ptr, "\"");
size_t q2pos = q1pos + strcspn(ptr + q1pos + 1, "\"") + 1;
if (strcspn(ptr, "\r\n") > q2pos)
@@ -52,7 +52,7 @@ static int64_t read_ts(char **line, int *duration)
{
int64_t start, end;
- if (sscanf(*line, "%"PRId64",%"PRId64, &start, &end) == 2) {
+ if (sscanf(*line, "%"SCNd64",%"SCNd64, &start, &end) == 2) {
*line += strcspn(*line, "\"") + 1;
*duration = end - start;
return start;
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index dcc7950..0bc4b97 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -255,7 +255,7 @@ static int rpl_read_header(AVFormatContext *s)
for (i = 0; !error && i < number_of_chunks; i++) {
int64_t offset, video_size, audio_size;
error |= read_line(pb, line, sizeof(line));
- if (3 != sscanf(line, "%"PRId64" , %"PRId64" ; %"PRId64,
+ if (3 != sscanf(line, "%"SCNd64" , %"SCNd64" ; %"SCNd64,
&offset, &video_size, &audio_size))
error = -1;
av_add_index_entry(vst, offset, i * rpl->frames_per_chunk,
diff --git a/libswscale/swscale-test.c b/libswscale/swscale-test.c
index aece61e..e0b887e 100644
--- a/libswscale/swscale-test.c
+++ b/libswscale/swscale-test.c
@@ -305,7 +305,7 @@ static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp,
ret = sscanf(buf,
" %12s %dx%d -> %12s %dx%d flags=%d CRC=%x"
- " SSD=%"PRId64 ", %"PRId64 ", %"PRId64 ", %"PRId64 "\n",
+ " SSD=%"SCNd64 ", %"SCNd64 ", %"SCNd64 ", %"SCNd64 "\n",
srcStr, &srcW, &srcH, dstStr, &dstW, &dstH,
&flags, &r.crc, &r.ssdY, &r.ssdU, &r.ssdV, &r.ssdA);
if (ret != 12) {
diff --git a/tools/seek_print.c b/tools/seek_print.c
index a99a0ad..8eb7627 100644
--- a/tools/seek_print.c
+++ b/tools/seek_print.c
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
av_ts2str(packet.pts), av_ts2timestr(packet.pts, tb));
av_free_packet(&packet);
}
- } else if (sscanf(*argv, "seek:%i:%"PRIi64":%"PRIi64":%"PRIi64":%i",
+ } else if (sscanf(*argv, "seek:%i:%"SCNi64":%"SCNi64":%"SCNi64":%i",
&stream, &min_ts, &ts, &max_ts, &flags) == 5) {
ret = avformat_seek_file(avf, stream, min_ts, ts, max_ts, flags);
printf("seek: %d (%s)\n", ret, av_err2str(ret));