fftools/textformat: Apply formatting and whitespace changes

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
This commit is contained in:
softworkz
2025-04-14 05:28:45 +02:00
parent f51c385a8e
commit 8f42d90413
9 changed files with 172 additions and 156 deletions

View File

@@ -56,9 +56,9 @@ typedef struct JSONContext {
#undef OFFSET
#define OFFSET(x) offsetof(JSONContext, x)
static const AVOption json_options[]= {
{ "compact", "enable compact output", OFFSET(compact), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{ "c", "enable compact output", OFFSET(compact), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
static const AVOption json_options[] = {
{ "compact", "enable compact output", OFFSET(compact), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
{ "c", "enable compact output", OFFSET(compact), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
{ NULL }
};
@@ -76,8 +76,8 @@ static av_cold int json_init(AVTextFormatContext *wctx)
static const char *json_escape_str(AVBPrint *dst, const char *src, void *log_ctx)
{
static const char json_escape[] = {'"', '\\', '\b', '\f', '\n', '\r', '\t', 0};
static const char json_subst[] = {'"', '\\', 'b', 'f', 'n', 'r', 't', 0};
static const char json_escape[] = { '"', '\\', '\b', '\f', '\n', '\r', '\t', 0 };
static const char json_subst[] = { '"', '\\', 'b', 'f', 'n', 'r', 't', 0 };
const char *p;
for (p = src; *p; p++) {