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
19c1bf15
Commit
19c1bf15
authored
May 25, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffprobe: reduce the number of AVBPrint resets.
parent
53ce9905
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
ffprobe.c
ffprobe.c
+9
-14
No files found.
ffprobe.c
View file @
19c1bf15
...
...
@@ -662,19 +662,17 @@ static void compact_show_tags(WriterContext *wctx, AVDictionary *dict)
AVDictionaryEntry
*
tag
=
NULL
;
AVBPrint
buf
;
av_bprint_init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
while
((
tag
=
av_dict_get
(
dict
,
""
,
tag
,
AV_DICT_IGNORE_SUFFIX
)))
{
if
(
wctx
->
nb_item
)
printf
(
"%c"
,
compact
->
item_sep
);
if
(
!
compact
->
nokey
)
{
av_bprint_
init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_
clear
(
&
buf
);
printf
(
"tag:%s="
,
compact
->
escape_str
(
&
buf
,
tag
->
key
,
compact
->
item_sep
,
wctx
));
av_bprint_finalize
(
&
buf
,
NULL
);
}
av_bprint_init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_clear
(
&
buf
);
printf
(
"%s"
,
compact
->
escape_str
(
&
buf
,
tag
->
value
,
compact
->
item_sep
,
wctx
));
av_bprint_finalize
(
&
buf
,
NULL
);
}
av_bprint_finalize
(
&
buf
,
NULL
);
}
static
const
Writer
compact_writer
=
{
...
...
@@ -867,9 +865,7 @@ static inline void json_print_item_str(WriterContext *wctx,
av_bprint_init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
printf
(
"
\"
%s
\"
:"
,
json_escape_str
(
&
buf
,
key
,
wctx
));
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_clear
(
&
buf
);
printf
(
"
\"
%s
\"
"
,
json_escape_str
(
&
buf
,
value
,
wctx
));
av_bprint_finalize
(
&
buf
,
NULL
);
}
...
...
@@ -1124,6 +1120,7 @@ static void xml_show_tags(WriterContext *wctx, AVDictionary *dict)
int
is_first
=
1
;
AVBPrint
buf
;
av_bprint_init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
xml
->
indent_level
++
;
while
((
tag
=
av_dict_get
(
dict
,
""
,
tag
,
AV_DICT_IGNORE_SUFFIX
)))
{
if
(
is_first
)
{
...
...
@@ -1134,14 +1131,12 @@ static void xml_show_tags(WriterContext *wctx, AVDictionary *dict)
}
XML_INDENT
();
av_bprint_
init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_
clear
(
&
buf
);
printf
(
"<tag key=
\"
%s
\"
"
,
xml_escape_str
(
&
buf
,
tag
->
key
,
wctx
));
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_init
(
&
buf
,
1
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_clear
(
&
buf
);
printf
(
" value=
\"
%s
\"
/>
\n
"
,
xml_escape_str
(
&
buf
,
tag
->
value
,
wctx
));
av_bprint_finalize
(
&
buf
,
NULL
);
}
av_bprint_finalize
(
&
buf
,
NULL
);
xml
->
indent_level
--
;
}
...
...
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