Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
4aee17d7
Commit
4aee17d7
authored
Jul 05, 2017
by
Michael Bebenita
Browse files
analyzer: escape build config
Change-Id: Ia3c83baa7057a0bbc1c5773e53858d32692c572f
parent
6b4d4c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/inspect.c
View file @
4aee17d7
...
...
@@ -254,6 +254,18 @@ int put_str(char *buffer, const char *str) {
return
i
;
}
int
put_str_with_escape
(
char
*
buffer
,
const
char
*
str
)
{
int
i
;
int
j
=
0
;
for
(
i
=
0
;
str
[
i
]
!=
'\0'
;
i
++
)
{
if
(
str
[
i
]
==
'"'
)
{
buffer
[
j
++
]
=
'\\'
;
}
buffer
[
j
++
]
=
str
[
i
];
}
return
j
;
}
int
put_num
(
char
*
buffer
,
char
prefix
,
int
num
,
char
suffix
)
{
int
i
=
0
;
char
*
buf
=
buffer
;
...
...
@@ -541,8 +553,9 @@ void inspect(void *pbi, void *data) {
buf
+=
put_str
(
buf
,
"
\"
config
\"
: {"
);
buf
+=
put_map
(
buf
,
config_map
);
buf
+=
put_str
(
buf
,
"},
\n
"
);
buf
+=
snprintf
(
buf
,
MAX_BUFFER
,
"
\"
configString
\"
:
\"
%s
\"\n
"
,
aom_codec_build_config
());
buf
+=
put_str
(
buf
,
"
\"
configString
\"
:
\"
"
);
buf
+=
put_str_with_escape
(
buf
,
aom_codec_build_config
());
buf
+=
put_str
(
buf
,
"
\"\n
"
);
decoded_frame_count
++
;
buf
+=
put_str
(
buf
,
"},
\n
"
);
*
(
buf
++
)
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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