Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
89388a95
Commit
89388a95
authored
Apr 10, 2013
by
James Almer
Committed by
Clément Bœsch
Apr 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace all occurrences of PRI in sscanf() calls with SCN
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
2383068c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
aqtitledec.c
libavformat/aqtitledec.c
+1
-1
mpeg.c
libavformat/mpeg.c
+1
-1
mpl2dec.c
libavformat/mpl2dec.c
+4
-4
pjsdec.c
libavformat/pjsdec.c
+2
-2
rpl.c
libavformat/rpl.c
+1
-1
swscale-test.c
libswscale/swscale-test.c
+1
-1
seek_print.c
tools/seek_print.c
+1
-1
No files found.
libavformat/aqtitledec.c
View file @
89388a95
...
@@ -70,7 +70,7 @@ static int aqt_read_header(AVFormatContext *s)
...
@@ -70,7 +70,7 @@ static int aqt_read_header(AVFormatContext *s)
line
[
strcspn
(
line
,
"
\r\n
"
)]
=
0
;
line
[
strcspn
(
line
,
"
\r\n
"
)]
=
0
;
if
(
sscanf
(
line
,
"-->> %"
PRI
d64
,
&
frame
)
==
1
)
{
if
(
sscanf
(
line
,
"-->> %"
SCN
d64
,
&
frame
)
==
1
)
{
new_event
=
1
;
new_event
=
1
;
pos
=
avio_tell
(
s
->
pb
);
pos
=
avio_tell
(
s
->
pb
);
if
(
sub
)
{
if
(
sub
)
{
...
...
libavformat/mpeg.c
View file @
89388a95
...
@@ -735,7 +735,7 @@ static int vobsub_read_header(AVFormatContext *s)
...
@@ -735,7 +735,7 @@ static int vobsub_read_header(AVFormatContext *s)
int64_t
pos
,
timestamp
;
int64_t
pos
,
timestamp
;
const
char
*
p
=
line
+
10
;
const
char
*
p
=
line
+
10
;
if
(
sscanf
(
p
,
"%02d:%02d:%02d:%03d, filepos: %"
PRI
x64
,
if
(
sscanf
(
p
,
"%02d:%02d:%02d:%03d, filepos: %"
SCN
x64
,
&
hh
,
&
mm
,
&
ss
,
&
ms
,
&
pos
)
!=
5
)
{
&
hh
,
&
mm
,
&
ss
,
&
ms
,
&
pos
)
!=
5
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Unable to parse timestamp line '%s', "
av_log
(
s
,
AV_LOG_ERROR
,
"Unable to parse timestamp line '%s', "
"abort parsing
\n
"
,
line
);
"abort parsing
\n
"
,
line
);
...
...
libavformat/mpl2dec.c
View file @
89388a95
...
@@ -40,8 +40,8 @@ static int mpl2_probe(AVProbeData *p)
...
@@ -40,8 +40,8 @@ static int mpl2_probe(AVProbeData *p)
const
unsigned
char
*
ptr_end
=
ptr
+
p
->
buf_size
;
const
unsigned
char
*
ptr_end
=
ptr
+
p
->
buf_size
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
sscanf
(
ptr
,
"[%"
PRId64
"][%"
PRI
d64
"]%c"
,
&
start
,
&
end
,
&
c
)
!=
3
&&
if
(
sscanf
(
ptr
,
"[%"
SCNd64
"][%"
SCN
d64
"]%c"
,
&
start
,
&
end
,
&
c
)
!=
3
&&
sscanf
(
ptr
,
"[%"
PRI
d64
"][]%c"
,
&
start
,
&
c
)
!=
2
)
sscanf
(
ptr
,
"[%"
SCN
d64
"][]%c"
,
&
start
,
&
c
)
!=
2
)
return
0
;
return
0
;
ptr
+=
strcspn
(
ptr
,
"
\r\n
"
)
+
1
;
ptr
+=
strcspn
(
ptr
,
"
\r\n
"
)
+
1
;
if
(
ptr
>=
ptr_end
)
if
(
ptr
>=
ptr_end
)
...
@@ -56,13 +56,13 @@ static int read_ts(char **line, int64_t *pts_start, int *duration)
...
@@ -56,13 +56,13 @@ static int read_ts(char **line, int64_t *pts_start, int *duration)
int
len
;
int
len
;
int64_t
end
;
int64_t
end
;
if
(
sscanf
(
*
line
,
"[%"
PRI
d64
"][]%c%n"
,
if
(
sscanf
(
*
line
,
"[%"
SCN
d64
"][]%c%n"
,
pts_start
,
&
c
,
&
len
)
>=
2
)
{
pts_start
,
&
c
,
&
len
)
>=
2
)
{
*
duration
=
-
1
;
*
duration
=
-
1
;
*
line
+=
len
-
1
;
*
line
+=
len
-
1
;
return
0
;
return
0
;
}
}
if
(
sscanf
(
*
line
,
"[%"
PRId64
"][%"
PRI
d64
"]%c%n"
,
if
(
sscanf
(
*
line
,
"[%"
SCNd64
"][%"
SCN
d64
"]%c%n"
,
pts_start
,
&
end
,
&
c
,
&
len
)
>=
3
)
{
pts_start
,
&
end
,
&
c
,
&
len
)
>=
3
)
{
*
duration
=
end
-
*
pts_start
;
*
duration
=
end
-
*
pts_start
;
*
line
+=
len
-
1
;
*
line
+=
len
-
1
;
...
...
libavformat/pjsdec.c
View file @
89388a95
...
@@ -39,7 +39,7 @@ static int pjs_probe(AVProbeData *p)
...
@@ -39,7 +39,7 @@ static int pjs_probe(AVProbeData *p)
int64_t
start
,
end
;
int64_t
start
,
end
;
const
unsigned
char
*
ptr
=
p
->
buf
;
const
unsigned
char
*
ptr
=
p
->
buf
;
if
(
sscanf
(
ptr
,
"%"
PRId64
",%"
PRI
d64
",%c"
,
&
start
,
&
end
,
&
c
)
==
3
)
{
if
(
sscanf
(
ptr
,
"%"
SCNd64
",%"
SCN
d64
",%c"
,
&
start
,
&
end
,
&
c
)
==
3
)
{
size_t
q1pos
=
strcspn
(
ptr
,
"
\"
"
);
size_t
q1pos
=
strcspn
(
ptr
,
"
\"
"
);
size_t
q2pos
=
q1pos
+
strcspn
(
ptr
+
q1pos
+
1
,
"
\"
"
)
+
1
;
size_t
q2pos
=
q1pos
+
strcspn
(
ptr
+
q1pos
+
1
,
"
\"
"
)
+
1
;
if
(
strcspn
(
ptr
,
"
\r\n
"
)
>
q2pos
)
if
(
strcspn
(
ptr
,
"
\r\n
"
)
>
q2pos
)
...
@@ -52,7 +52,7 @@ static int64_t read_ts(char **line, int *duration)
...
@@ -52,7 +52,7 @@ static int64_t read_ts(char **line, int *duration)
{
{
int64_t
start
,
end
;
int64_t
start
,
end
;
if
(
sscanf
(
*
line
,
"%"
PRId64
",%"
PRI
d64
,
&
start
,
&
end
)
==
2
)
{
if
(
sscanf
(
*
line
,
"%"
SCNd64
",%"
SCN
d64
,
&
start
,
&
end
)
==
2
)
{
*
line
+=
strcspn
(
*
line
,
"
\"
"
)
+
1
;
*
line
+=
strcspn
(
*
line
,
"
\"
"
)
+
1
;
*
duration
=
end
-
start
;
*
duration
=
end
-
start
;
return
start
;
return
start
;
...
...
libavformat/rpl.c
View file @
89388a95
...
@@ -255,7 +255,7 @@ static int rpl_read_header(AVFormatContext *s)
...
@@ -255,7 +255,7 @@ static int rpl_read_header(AVFormatContext *s)
for
(
i
=
0
;
!
error
&&
i
<
number_of_chunks
;
i
++
)
{
for
(
i
=
0
;
!
error
&&
i
<
number_of_chunks
;
i
++
)
{
int64_t
offset
,
video_size
,
audio_size
;
int64_t
offset
,
video_size
,
audio_size
;
error
|=
read_line
(
pb
,
line
,
sizeof
(
line
));
error
|=
read_line
(
pb
,
line
,
sizeof
(
line
));
if
(
3
!=
sscanf
(
line
,
"%"
PRId64
" , %"
PRId64
" ; %"
PRI
d64
,
if
(
3
!=
sscanf
(
line
,
"%"
SCNd64
" , %"
SCNd64
" ; %"
SCN
d64
,
&
offset
,
&
video_size
,
&
audio_size
))
&
offset
,
&
video_size
,
&
audio_size
))
error
=
-
1
;
error
=
-
1
;
av_add_index_entry
(
vst
,
offset
,
i
*
rpl
->
frames_per_chunk
,
av_add_index_entry
(
vst
,
offset
,
i
*
rpl
->
frames_per_chunk
,
...
...
libswscale/swscale-test.c
View file @
89388a95
...
@@ -305,7 +305,7 @@ static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp,
...
@@ -305,7 +305,7 @@ static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp,
ret
=
sscanf
(
buf
,
ret
=
sscanf
(
buf
,
" %12s %dx%d -> %12s %dx%d flags=%d CRC=%x"
" %12s %dx%d -> %12s %dx%d flags=%d CRC=%x"
" SSD=%"
PRId64
", %"
PRId64
", %"
PRId64
", %"
PRI
d64
"
\n
"
,
" SSD=%"
SCNd64
", %"
SCNd64
", %"
SCNd64
", %"
SCN
d64
"
\n
"
,
srcStr
,
&
srcW
,
&
srcH
,
dstStr
,
&
dstW
,
&
dstH
,
srcStr
,
&
srcW
,
&
srcH
,
dstStr
,
&
dstW
,
&
dstH
,
&
flags
,
&
r
.
crc
,
&
r
.
ssdY
,
&
r
.
ssdU
,
&
r
.
ssdV
,
&
r
.
ssdA
);
&
flags
,
&
r
.
crc
,
&
r
.
ssdY
,
&
r
.
ssdU
,
&
r
.
ssdV
,
&
r
.
ssdA
);
if
(
ret
!=
12
)
{
if
(
ret
!=
12
)
{
...
...
tools/seek_print.c
View file @
89388a95
...
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
...
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
av_ts2str
(
packet
.
pts
),
av_ts2timestr
(
packet
.
pts
,
tb
));
av_ts2str
(
packet
.
pts
),
av_ts2timestr
(
packet
.
pts
,
tb
));
av_free_packet
(
&
packet
);
av_free_packet
(
&
packet
);
}
}
}
else
if
(
sscanf
(
*
argv
,
"seek:%i:%"
PRIi64
":%"
PRIi64
":%"
PRI
i64
":%i"
,
}
else
if
(
sscanf
(
*
argv
,
"seek:%i:%"
SCNi64
":%"
SCNi64
":%"
SCN
i64
":%i"
,
&
stream
,
&
min_ts
,
&
ts
,
&
max_ts
,
&
flags
)
==
5
)
{
&
stream
,
&
min_ts
,
&
ts
,
&
max_ts
,
&
flags
)
==
5
)
{
ret
=
avformat_seek_file
(
avf
,
stream
,
min_ts
,
ts
,
max_ts
,
flags
);
ret
=
avformat_seek_file
(
avf
,
stream
,
min_ts
,
ts
,
max_ts
,
flags
);
printf
(
"seek: %d (%s)
\n
"
,
ret
,
av_err2str
(
ret
));
printf
(
"seek: %d (%s)
\n
"
,
ret
,
av_err2str
(
ret
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment