From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 387174D9D4
	for <ffmpegdev@gitmailbox.com>; Mon, 21 Apr 2025 17:12:52 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 52114687DE9;
	Mon, 21 Apr 2025 20:12:47 +0300 (EEST)
Received: from NAM10-BN7-obe.outbound.protection.outlook.com
 (mail-bn7nam10olkn2092.outbound.protection.outlook.com [40.92.40.92])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D1C24687D61
 for <ffmpeg-devel@ffmpeg.org>; Mon, 21 Apr 2025 20:12:39 +0300 (EEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=ObffCoXoW4wUDtNv89AMyZPwihmQqpdAOR5i9/eqPo4GxZk3bmbbKoSvYN+vmVPtnZosmp1ZmZvepcf18gMkVpm3cs13cqKJeFS9mK+nkllDaOdTrbgdm0p8ZUdjMBFZpF0BU+ZImRHwhXgh01/KGpmF9yvoLriJzozhyxPAUOyGHLIeCEdX1s/2JSeB9xvb7x2fK1pCF2g975m6ikk8iVO2XAAnxebJa3usTUKw3KDS6gV1pb0HR/SgqhH46Lmg4+mkXtA4SZVksjPOsiPvY+ZFcJhYMZALva0rWBqcQ6I7KPlwoe9aeapRGxq63lJgN/uOQIqcpgjYMPDaHVfOgg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=ZDMuOnfy4WDobwombyKpodwmMfETi6xMKJtAqgJI8aM=;
 b=ZiUoD9GPcEQXUuod6n71qYPN+fjehQrbg6ptYK67Oys2dk0kVs+2VxJdlEqrJACFq03cYkjDOI7wWOzxRkmylpPJy9dyxhrrDVclx9H+jiFeSGi2+rnrUui1UyG3frAZrSFq2vhrunHkXLdsadXK35GorHMxCH9r747VUiM+K7PdU6Goz0Er+1E/FADVyOMSJipUeazWpTZ+WX2CEXqg/K353uSZU/mYXB0HrlcWtOFAlnS86mo26jaOvF3Yxbp9wBqzo3Wdeq1QF06z9wP9E9NczBPCN40yNIlk5L64R6nOMKUPwzJ0izY8c4zoIl82IaFOZe27OxSKBzg6lYDeHA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=ZDMuOnfy4WDobwombyKpodwmMfETi6xMKJtAqgJI8aM=;
 b=n27DiG3ZCS4R3V2/ZDm4jWcJBZ3P6LantFHB0gzhOFB8H13vut4rMIYiA5qaMZPDCCuH1JIqq5QmidHwEpO635NIo8WI+PTYdJ/1iA+OLdtcdEuOGkfl/E1O/8JCpk2+bWQ+Qfx7OspR38s/j8yb3d+zCED7WEF21TagqRbo1rqEptyNhzvGVZtyEsPC+my7vMgWbsZlSTuDaGQD9bEZMM0j6k9q+KMTW5nuqqWxO/s6syiLvcgsm8E7L0isGhwZ1ayikPH7Wh1dIrNXqQnE5B4RYkNpXKw5dte++NUFrxP+PnrsmBCS8PZ1jqfLdMINizKGCYHFGWbaavN4nZfvZg==
Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:b::20) by
 DM3PPF577C9CCE5.NAMP223.PROD.OUTLOOK.COM (2603:10b6:f:fc00::b9f) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8655.31; Mon, 21 Apr
 2025 17:12:37 +0000
Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM
 ([fe80::bf09:8e9:b07f:98a7]) by DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM
 ([fe80::bf09:8e9:b07f:98a7%4]) with mapi id 15.20.8655.033; Mon, 21 Apr 2025
 17:12:37 +0000
From: "softworkz ." <softworkz-at-hotmail.com@ffmpeg.org>
To: Stefano Sabatini <stefasab@gmail.com>, FFmpeg development discussions and
 patches <ffmpeg-devel@ffmpeg.org>
Thread-Topic: [FFmpeg-devel] [PATCH 1/9] fftools/textformat: Formatting and
 whitespace changes
Thread-Index: AQHbrTtfndqhxR2fJkuPlWjCXSl2Y7OuYSKAgAACakA=
Date: Mon, 21 Apr 2025 17:12:37 +0000
Message-ID: <DM8P223MB0365E9DF9D18CA28B8E82D67BAB82@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM>
References: <pull.66.ffstaging.FFmpeg.1744634826.ffmpegagent@gmail.com>
 <3df2018c81327379621cbe70c92d51b30cf9f81f.1744634826.git.ffmpegagent@gmail.com>
 <aAZ32+EdhsWEuU9b@mariano>
In-Reply-To: <aAZ32+EdhsWEuU9b@mariano>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DM8P223MB0365:EE_|DM3PPF577C9CCE5:EE_
x-ms-office365-filtering-correlation-id: cac685c6-1cdf-4549-98aa-08dd80f7b702
x-ms-exchange-slblob-mailprops: Cq7lScuPrnpFX5gNBgVui9nZ6J+Gucr/sxBV9JC86nFnUdUxoCfAtKWBCHee2rZ8eiMVlpgeZiPUGJJQDb2KCajxqGQmPrI4jBzbHFEiKndmliRHAuOZGMTRnqtscTzTkhpM7+5LyBmq67OU3R/IDfC5LFdwZ6eq+JISeNwp23uHrEfU2/kuf2KJPetgGfysjMhwWFyiowCJ39MySV4hxzHd70EHVMe/XJ9R5ixaRM76Yp6/3yQnusYgCWQMG+21n1ukFpsQNiBn/+cmtmch6pOwI2nEPHLsLHh2TsWuiGZK4ALyE0UB8HsQA8YfoN7ne5QB0CMBaZ9lhtmI7v6SSn+uSVQ8t0pSQgcGqnCC3t1Yy+x4FU1zEhDe8xpX/nNt3tXtdQuiv3We8xjsalTJ45LPZJyI+khikE0xSICiMCq9CuAmUCJiIrjt2NZBTz/I9s+OFmthzW9+sQzvHPO6HfnLIsPjoSlS+MLsgicOyPRw1I/IqlMigfHh1RCcQOzZkjrDy/rmxjE1WAxHTxkkFKfU3sguCjjupWhCmpBH7e2VTez8IYZ1Ztp54crVuset0cvS6v8Ii9+m7WCIjlJaP9pFM9oNCZJZi8j2fKpyqlG93chXecNMc1XiQhSmWPUZJVPqBFkpN8NdNVSrm3mYRn3H2P/o46w8T4avGQxB754DVbp0YOf3kWGL2WRMBaZaSlCf4EWDdPXhKbsVO0IJXqBxmhcQ7a4Ip/dwNH4lBxOrZ/PuChZUSvz+BgYfmM9jaqv0/8br5dA=
x-microsoft-antispam: BCL:0;
 ARA:14566002|461199028|15080799006|7092599003|12121999004|8062599003|19110799003|8060799006|102099032|3412199025|440099028|12091999003|41001999003;
x-microsoft-antispam-message-info: =?us-ascii?Q?JfTtTSPwqymBKuK6hChgY2vQZOkE+jJ9XhPXqNMNloPWQU5Pv2PwMmtSBtt3?=
 =?us-ascii?Q?gn2Oe7+d5H87MFRtOSJRjqymmy7L/CQWbuncOASWzdX1vYZk8QGqPa1StxJb?=
 =?us-ascii?Q?lfZh7KxGf5ce8f+BCGeunV3IHcP9C+eFQynbkrQpMXLzUZtfeEGZHgxWYlpm?=
 =?us-ascii?Q?Pv9L6x29JW5Kr1J4NSXhV5m4HMYRsyIhEpfj0PxEv0lNT7XISbJbDcecVr4v?=
 =?us-ascii?Q?ys07VGUjwn/jJN+OUaIS7oafpYvmTeZC7lnzXFFbSnd/3lIVktbfM6VjeGf6?=
 =?us-ascii?Q?iZ1NQG8LVtTeI58A5Up+ZfLKAEzg/umeU5zL/cf1ulSN0a6+uKwg+cHWW3Lp?=
 =?us-ascii?Q?8ue1jIiu05qy61eN+bOT+yQ8k9lf6jR6pa52hhUIDlMyjUSvShPSd5HZ5Hti?=
 =?us-ascii?Q?L5Q2f9LgFtA2odC012b9QYnUj2N1KQ8Fd7dWB1ASynkOLnP7fu5NpnyLnAAq?=
 =?us-ascii?Q?UZIZA+zH3wm86ciiIgsYukaJfWekFwpbL9mYrk9XWwjMQCv0zW/R5d1lYCOK?=
 =?us-ascii?Q?cSogwjFlcv82lSqdvKiqWNGFBzQE9mt/5BrSP2zSZaC015l+mK25Qj1n7YUF?=
 =?us-ascii?Q?Sikr1d71e+D9PUDRygSqAFHao9fD+ljgXUuXP2BGpk2IlR6B8//aftBAz6A+?=
 =?us-ascii?Q?J2As4Z+xJ3YgvXCkFSz/hNPLCvjIqvZRyl/3CVVPJCoxEZsgO/Fx+WT5X0Mi?=
 =?us-ascii?Q?nMM341q/kIzqgJezmCH7o+FG5XDmXT6EMtXoGFONTM38BToCtR3NX9cCQktN?=
 =?us-ascii?Q?+WeNZAcacU2Dq4RopTFQO6B9NaIdhZ5FmiwaC8CdF30ciYJVqhVpj6ytcLCQ?=
 =?us-ascii?Q?x1vkgwg9Qm5dLqMPj05w9p37z+L0EBpPclOs8pouGswGC+kQV5mtnmTYy8bK?=
 =?us-ascii?Q?hpco2PSxP01JYP1qnpRqa/L567ANTcKN90vRCuWY0qrYc+Va6AKmHeoLAk0i?=
 =?us-ascii?Q?K4xq2coTU6CLBx5qeTUmS++AyNc4HdMEVD/cTbdzhMHcltqgm2bXVGAoTEqy?=
 =?us-ascii?Q?fi329IpEYldKfFS1X1QG8DqoxjkzSYwT+wi3VInwOq4gmviUYAYa1Tz7r+b4?=
 =?us-ascii?Q?l2in+0aIl3V5YCIjwf0Q35+Qu2j/shTqO5/v2hpRgu2n9sRMt6ztpAr2nLPS?=
 =?us-ascii?Q?XJYqXGDPlNC3RxZ08Q7JzzJ8WoR7n2kbdQGD1VN0UU5XGrt6rNfNqa95q63p?=
 =?us-ascii?Q?vncuehalw4nruRCiZFezi/Bglsgb7Q73R5+i+w=3D=3D?=
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ys2/y6AjSj4Sj/lX5DDBBp/Vez2cjHLTzojIFPqp79/itCtYUPn06zTsIon0?=
 =?us-ascii?Q?brPA3J8YGqM2piRnZPD2KSKJmnS162bKOkHNJN1srt8nPZQsEtq8AiNBnoFB?=
 =?us-ascii?Q?4XkWGM+9SCkDomHB4kinV3mkytWK+vYtpH5JWg6lXnZzhChYpxLsEgCdB1nl?=
 =?us-ascii?Q?d6dJXtiFwDWr9iSRsdN5V0510KGzjCZkTFNVwLtfpKGBF81bip+B1bMnDLpS?=
 =?us-ascii?Q?rmRLsO8h5eyPKQKIeA59Ofj2XXov4RHsuLQqtjGQlvR4MjprLPzqlUN/V6Yo?=
 =?us-ascii?Q?7vXh+3rkMhpgl2KEGlCgE4xn1eN61NAvET/9IvUD7kbsgvwUHmVAGVbSUHWv?=
 =?us-ascii?Q?v8TKXGQ0iJVYKH+KcdL/oKZ8XxwtxvZsQP8RS6MzRANLOLpVSD2sLMxHWBjs?=
 =?us-ascii?Q?eYGuZX5lkS31S+KrvqaKa82j/BsGcOZSnPhzWLoflPkdX4b7XJF7vi4zDLWM?=
 =?us-ascii?Q?pz+uJ+7hts8hiRquiESKfMRt9V/lnEIXuFrEo3Tr63tNMDplWux3dSElnhsv?=
 =?us-ascii?Q?Spr5ae3FFPuOL5ycNagCVuYPrcMQjmUapBtGil3m4UY6wUxsVND0y115Vrdz?=
 =?us-ascii?Q?OJ7ugb/IeuMp/sdxjz2DmzEShJptEOuzx/SW74L05EhF0TilZ+HdEqdTzo9b?=
 =?us-ascii?Q?7gS1LTF9EnErVHxFrtI1QYowPurheBi25uTIOFI/5JbjdBmw/KGnj5cUZXNk?=
 =?us-ascii?Q?BpcU5g/tQ3hJREfELYmcnNHa6B6yVMDlXWwPThXyn2CU4P7SQunHHWYCkpf6?=
 =?us-ascii?Q?xPhiARylbnAOkN06c/3EY+VcnKi5JCBKm+bNQHSnT8GhCFpPRLCvY+fiDbZH?=
 =?us-ascii?Q?SproO/ciYNNiuCZUAz0ATJPXKjUuOhlMlwwle2LaOztNcDD5ncES+Mh0BUzc?=
 =?us-ascii?Q?+yfv99+Yx3U3qZui+ZuxR92zq8H9QHdnLs3mURH9BNluHtHrCTMCsAf+HhZf?=
 =?us-ascii?Q?DISv5SaCOC2g+IXe6r4F5UwrWLuH6wkg6CMCR4tKKQ8lZqiqieJnygfxUnJn?=
 =?us-ascii?Q?RcSTfVy9V06O/i1IUs58G2SuJQnaYMPO/TYVqrbG53GywdfRI+7aOhjAU5G+?=
 =?us-ascii?Q?vfGJBOxQzpRBP6Z1cnLbvvxgnJXT70yXyVYdYEhCAc4uUnnCbKQl6cB3mXyl?=
 =?us-ascii?Q?TVGFV7k1s+iioE3BGPleIf42ZX1LTXjPJn6lM//2Vs+XgaiMmMgXmzvJFtqd?=
 =?us-ascii?Q?eCDO8/L+46bSR4M7ymR3guSod5hJ+0P6t246uwLihNb9O8v2mfPeE8Gy1s0?=
 =?us-ascii?Q?=3D?=
MIME-Version: 1.0
X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-92255.templateTenant
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: cac685c6-1cdf-4549-98aa-08dd80f7b702
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2025 17:12:37.2012 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PPF577C9CCE5
Subject: Re: [FFmpeg-devel] [PATCH 1/9] fftools/textformat: Formatting and
 whitespace changes
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/DM8P223MB0365E9DF9D18CA28B8E82D67BAB82@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>



> -----Original Message-----
> From: Stefano Sabatini <stefasab@gmail.com>
> Sent: Montag, 21. April 2025 18:53
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Cc: softworkz <softworkz@hotmail.com>
> Subject: Re: [FFmpeg-devel] [PATCH 1/9] fftools/textformat: Formatting
> and whitespace changes
> 
> On date Monday 2025-04-14 12:46:58 +0000, softworkz wrote:
> > From: softworkz <softworkz@hotmail.com>
> >
> > Signed-off-by: softworkz <softworkz@hotmail.com>
> > ---
> >  fftools/textformat/avtextformat.c  | 104 +++++++++++++++-----------
> ---
> >  fftools/textformat/avtextformat.h  |  16 ++---
> >  fftools/textformat/avtextwriters.h |  11 ++-
> >  fftools/textformat/tf_compact.c    |  91 ++++++++++++++-----------
> >  fftools/textformat/tf_default.c    |  20 +++---
> >  fftools/textformat/tf_flat.c       |  26 ++++----
> >  fftools/textformat/tf_ini.c        |  36 +++++-----
> >  fftools/textformat/tf_json.c       |  10 +--
> >  fftools/textformat/tf_xml.c        |  30 +++++----
> >  9 files changed, 183 insertions(+), 161 deletions(-)
> >
> 
> [...]
> > -int avtext_context_open(AVTextFormatContext **ptctx, const
> AVTextFormatter *formatter, AVTextWriterContext *writer_context, const
> char *args,
> > -                        const struct AVTextFormatSection *sections,
> int nb_sections,
> > -                        int show_value_unit,
> > -                        int use_value_prefix,
> > -                        int use_byte_value_binary_prefix,
> > -                        int use_value_sexagesimal_format,
> > -                        int show_optional_fields,
> > -                        char *show_data_hash)
> > +int avtext_context_open(AVTextFormatContext      **ptctx,
> > +                        const AVTextFormatter     *formatter,
> > +                        AVTextWriterContext       *writer_context,
> > +                        const char                *args,
> > +                        const AVTextFormatSection *sections,
> > +                        int                        nb_sections,
> > +                        int                        show_value_unit,
> > +                        int
> use_value_prefix,
> > +                        int
> use_byte_value_binary_prefix,
> > +                        int
> use_value_sexagesimal_format,
> > +                        int
> show_optional_fields,
> > +                        char                      *show_data_hash)
> 
> This is possibly one of the few places where we align
> parameters. Unrelated note: the function also has too many parameters,
> probably they should be merged in a flags field.

Or an options struct maybe?


> 
> >  {
> >      AVTextFormatContext *tctx;
> >      int i, ret = 0;
> > @@ -197,7 +201,7 @@ int avtext_context_open(AVTextFormatContext
> **ptctx, const AVTextFormatter *form
> >          av_dict_free(&opts);
> >      }
> >
> > -    if (show_data_hash) {
> 
> > +    if (show_data_hash)
> >          if ((ret = av_hash_alloc(&tctx->hash, show_data_hash)) < 0)
> {
> >              if (ret == AVERROR(EINVAL)) {
> >                  const char *n;
> > @@ -208,7 +212,6 @@ int avtext_context_open(AVTextFormatContext
> **ptctx, const AVTextFormatter *form
> >              }
> >              return ret;
> >          }
> > -    }
> 
> I'm a bit against dropping {} since this doesn't add to redability in
> most cases and can lead to bugs in case more statements are added in
> the if block (since it's easy to miss the wrapping parentheses
> addition).

I thought the rules would say that "if" blocks should only be parenthesized
when it has multiple statements OR there's an "else" clause.

Personally, I would always use parenthesizes, but that's of little 
relevance when the codebase has different rules.


> 
> [...]
> > @@ -81,6 +81,7 @@ static const char *c_escape_str(AVBPrint *dst,
> const char *src, const char sep,
> >  static const char *csv_escape_str(AVBPrint *dst, const char *src,
> const char sep, void *log_ctx)
> >  {
> >      char meta_chars[] = { sep, '"', '\n', '\r', '\0' };
> > +
> >      int needs_quoting = !!src[strcspn(src, meta_chars)];
> >
> >      if (needs_quoting)
> > @@ -117,16 +118,16 @@ typedef struct CompactContext {
> >  #undef OFFSET
> >  #define OFFSET(x) offsetof(CompactContext, x)
> >
> > -static const AVOption compact_options[]= {
> > -    {"item_sep", "set item separator",    OFFSET(item_sep_str),
> AV_OPT_TYPE_STRING, {.str="|"},  0, 0 },
> > -    {"s",        "set item separator",    OFFSET(item_sep_str),
> AV_OPT_TYPE_STRING, {.str="|"},  0, 0 },
> > -    {"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        },
> > -    {"escape",   "set escape mode",       OFFSET(escape_mode_str),
> AV_OPT_TYPE_STRING, {.str="c"},  0, 0 },
> > -    {"e",        "set escape mode",       OFFSET(escape_mode_str),
> AV_OPT_TYPE_STRING, {.str="c"},  0, 0 },
> > -    {"print_section", "print section name", OFFSET(print_section),
> AV_OPT_TYPE_BOOL,   {.i64=1},    0,        1        },
> > -    {"p",             "print section name", OFFSET(print_section),
> AV_OPT_TYPE_BOOL,   {.i64=1},    0,        1        },
> > -    {NULL},
> > +static const AVOption compact_options[] = {
> > +    { "item_sep", "set item separator",      OFFSET(item_sep_str),
> AV_OPT_TYPE_STRING, { .str = "|" },  0, 0 },
> > +    { "s",        "set item separator",      OFFSET(item_sep_str),
> AV_OPT_TYPE_STRING, { .str = "|" },  0, 0 },
> > +    { "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 },
> > +    { "escape",   "set escape mode",
> OFFSET(escape_mode_str), AV_OPT_TYPE_STRING, { .str = "c" },  0, 0 },
> > +    { "e",        "set escape mode",
> OFFSET(escape_mode_str), AV_OPT_TYPE_STRING, { .str = "c" },  0, 0 },
> > +    { "print_section", "print section name", OFFSET(print_section),
> AV_OPT_TYPE_BOOL,   { .i64 = 1   },  0, 1 },
> > +    { "p",             "print section name", OFFSET(print_section),
> AV_OPT_TYPE_BOOL,   { .i64 = 1   },  0, 1 },
> > +    { NULL },
> 
> About this kind of changes:
> {FIELDS...} => { FIELDS... }
> 
> I'm not against it but I wonder if there are coding style guidelines
> to follow or we end up with every single file using a different style
> - we might even enforce or automate some of them through the use of
> tooling.

I had started an attempt to create .clang-format and .clang-tidy config
files that match the formatting and warnings to the FFmpeg code base.
I got stuck with the second part after I had determined that a number of
the clang-tidy warnings are useful during work even though these are 
warning about things that are done at countless places.

But I can share the .clang-format file for review and further refinement
when there's interest. I think this would be beneficial and would allow
to achieve a higher degree of consistency.


> Rest of the changes looks good to me, thanks.


Thanks a lot for looking at it!
sw
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".