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
f821b2ea
Commit
f821b2ea
authored
Apr 04, 2018
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avprobe: Support printing strings with empty keys
parent
cc06f7bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
avprobe.c
avtools/avprobe.c
+26
-12
No files found.
avtools/avprobe.c
View file @
f821b2ea
...
...
@@ -235,10 +235,14 @@ static void ini_print_integer(const char *key, int64_t value)
static
void
ini_print_string
(
const
char
*
key
,
const
char
*
value
)
{
ini_escape_print
(
key
);
avio_printf
(
probe_out
,
"="
);
ini_escape_print
(
value
);
avio_w8
(
probe_out
,
'\n'
);
if
(
key
)
{
ini_escape_print
(
key
);
avio_printf
(
probe_out
,
"=%s
\n
"
,
value
);
}
else
{
if
(
octx
.
prefix
[
octx
.
level
-
1
].
nb_elems
)
avio_printf
(
probe_out
,
","
);
avio_printf
(
probe_out
,
"%s"
,
value
);
}
}
/*
...
...
@@ -329,14 +333,24 @@ static void json_escape_print(const char *s)
static
void
json_print_string
(
const
char
*
key
,
const
char
*
value
)
{
if
(
octx
.
prefix
[
octx
.
level
-
1
].
nb_elems
)
avio_printf
(
probe_out
,
",
\n
"
);
AVP_INDENT
();
avio_w8
(
probe_out
,
'\"'
);
json_escape_print
(
key
);
avio_printf
(
probe_out
,
"
\"
:
\"
"
);
json_escape_print
(
value
);
avio_w8
(
probe_out
,
'\"'
);
if
(
key
)
{
if
(
octx
.
prefix
[
octx
.
level
-
1
].
nb_elems
)
avio_printf
(
probe_out
,
",
\n
"
);
AVP_INDENT
();
avio_w8
(
probe_out
,
'\"'
);
json_escape_print
(
key
);
avio_printf
(
probe_out
,
"
\"
:
\"
"
);
json_escape_print
(
value
);
avio_w8
(
probe_out
,
'\"'
);
}
else
{
if
(
octx
.
prefix
[
octx
.
level
-
1
].
nb_elems
)
avio_printf
(
probe_out
,
", "
);
else
AVP_INDENT
();
avio_w8
(
probe_out
,
'\"'
);
json_escape_print
(
value
);
avio_w8
(
probe_out
,
'\"'
);
}
}
/*
...
...
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