ffprobe: update entry index after printing packet/media type

Fix JSON output in case a frame or packet section contains a nested section.

Fix trac issue http://trac.ffmpeg.org/ticket/8680.

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Stefano Sabatini 2022-04-21 09:01:14 +02:00 committed by Marton Balint
parent ade36d61de
commit 7adeeff91f
1 changed files with 1 additions and 0 deletions

View File

@ -1566,6 +1566,7 @@ static void json_print_section_header(WriterContext *wctx)
if (!json->compact)
JSON_INDENT();
printf("\"type\": \"%s\"", section->name);
wctx->nb_item[wctx->level]++;
}
}
av_bprint_finalize(&buf, NULL);