aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/textformat/tf_default.c
diff options
context:
space:
mode:
authorsoftworkz <softworkz@hotmail.com>2025-04-14 05:28:45 +0200
committersoftworkz <softworkz@hotmail.com>2025-05-15 23:04:44 +0200
commit8f42d90413f64574b8e15de27fc2430102843dbf (patch)
treee2d9e695cf093b84bf257d467c2a63529888ee82 /fftools/textformat/tf_default.c
parentf51c385a8e643ee12eb6be160e2fa4b5ae57a50b (diff)
downloadffmpeg-8f42d90413f64574b8e15de27fc2430102843dbf.tar.gz
fftools/textformat: Apply formatting and whitespace changes
Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: softworkz <softworkz@hotmail.com>
Diffstat (limited to 'fftools/textformat/tf_default.c')
-rw-r--r--fftools/textformat/tf_default.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fftools/textformat/tf_default.c b/fftools/textformat/tf_default.c
index 86582829e4..2c5047eafd 100644
--- a/fftools/textformat/tf_default.c
+++ b/fftools/textformat/tf_default.c
@@ -56,11 +56,11 @@ typedef struct DefaultContext {
#define OFFSET(x) offsetof(DefaultContext, x)
static const AVOption default_options[] = {
- { "noprint_wrappers", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
- { "nw", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
- { "nokey", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
- { "nk", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
- {NULL},
+ { "noprint_wrappers", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
+ { "nw", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
+ { "nokey", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
+ { "nk", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
+ { NULL },
};
DEFINE_FORMATTER_CLASS(default);
@@ -69,7 +69,7 @@ DEFINE_FORMATTER_CLASS(default);
static inline char *upcase_string(char *dst, size_t dst_size, const char *src)
{
int i;
- for (i = 0; src[i] && i < dst_size-1; i++)
+ for (i = 0; src[i] && i < dst_size - 1; i++)
dst[i] = av_toupper(src[i]);
dst[i] = 0;
return dst;
@@ -85,10 +85,10 @@ static void default_print_section_header(AVTextFormatContext *wctx, const void *
av_bprint_clear(&wctx->section_pbuf[wctx->level]);
if (parent_section &&
- !(parent_section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER|AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY))) {
+ !(parent_section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER | AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY))) {
def->nested_section[wctx->level] = 1;
av_bprintf(&wctx->section_pbuf[wctx->level], "%s%s:",
- wctx->section_pbuf[wctx->level-1].str,
+ wctx->section_pbuf[wctx->level - 1].str,
upcase_string(buf, sizeof(buf),
av_x_if_null(section->element_name, section->name)));
}
@@ -96,7 +96,7 @@ static void default_print_section_header(AVTextFormatContext *wctx, const void *
if (def->noprint_wrappers || def->nested_section[wctx->level])
return;
- if (!(section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER|AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY)))
+ if (!(section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER | AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY)))
writer_printf(wctx, "[%s]\n", upcase_string(buf, sizeof(buf), section->name));
}
@@ -109,7 +109,7 @@ static void default_print_section_footer(AVTextFormatContext *wctx)
if (def->noprint_wrappers || def->nested_section[wctx->level])
return;
- if (!(section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER|AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY)))
+ if (!(section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER | AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY)))
writer_printf(wctx, "[/%s]\n", upcase_string(buf, sizeof(buf), section->name));
}