summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-12-20 15:07:10 -0300
committerJames Almer <jamrial@gmail.com>2021-12-22 09:41:13 -0300
commit131dbb9a7a2dd645c36a85190e2fe0ab987c45cf (patch)
tree649459aa178fb0133fbe8e4e00c033d8facb9a22 /fftools
parent18ad360648cd185b0ffbb444eedcbf5732774408 (diff)
downloadffmpeg-131dbb9a7a2dd645c36a85190e2fe0ab987c45cf.tar.gz
ffprobe: add missing separator when printing side data in compact output
Should fix ticket #7153 Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffprobe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 0711e02922..906bb03b16 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -1151,8 +1151,10 @@ static void compact_print_section_header(WriterContext *wctx)
if (parent_section && compact->has_nested_elems[wctx->level-1] &&
(section->flags & SECTION_FLAG_IS_ARRAY)) {
compact->terminate_line[wctx->level-1] = 0;
- printf("\n");
}
+ if (parent_section && !(parent_section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)) &&
+ wctx->level && wctx->nb_item[wctx->level-1])
+ printf("%c", compact->item_sep);
if (compact->print_section &&
!(section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
printf("%s%c", section->name, compact->item_sep);