summaryrefslogtreecommitdiffstats
path: root/ffprobe.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-05-29 23:21:43 +0200
committerClément Bœsch <ubitux@gmail.com>2012-06-01 20:52:30 +0200
commitdb839544d6154a244225774f43fc1510e2bc97b3 (patch)
tree3f5bb96dc2f59adb25bce0bb31d3d53c3326427f /ffprobe.c
parent2248db946c006b7d8fde697b9532495da22dc876 (diff)
downloadffmpeg-streaming-db839544d6154a244225774f43fc1510e2bc97b3.zip
ffmpeg-streaming-db839544d6154a244225774f43fc1510e2bc97b3.tar.gz
ffprobe/xml: use writer multiple_sections instead of local context variable.
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ffprobe.c b/ffprobe.c
index df35343..e2a59bd 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1114,7 +1114,6 @@ static const Writer json_writer = {
typedef struct {
const AVClass *class;
int within_tag;
- int multiple_entries; ///< tells if the given chapter requires multiple entries
int indent_level;
int fully_qualified;
int xsd_strict;
@@ -1229,11 +1228,7 @@ static void xml_print_chapter_header(WriterContext *wctx, const char *chapter)
if (wctx->nb_chapter)
printf("\n");
- xml->multiple_entries = !strcmp(chapter, "packets") || !strcmp(chapter, "frames") ||
- !strcmp(chapter, "packets_and_frames") ||
- !strcmp(chapter, "streams") || !strcmp(chapter, "library_versions");
-
- if (xml->multiple_entries) {
+ if (wctx->multiple_sections) {
XML_INDENT(); printf("<%s>\n", chapter);
xml->indent_level++;
}
@@ -1243,7 +1238,7 @@ static void xml_print_chapter_footer(WriterContext *wctx, const char *chapter)
{
XMLContext *xml = wctx->priv;
- if (xml->multiple_entries) {
+ if (wctx->multiple_sections) {
xml->indent_level--;
XML_INDENT(); printf("</%s>\n", chapter);
}
OpenPOWER on IntegriCloud