From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 725C74CE6F for ; Thu, 29 May 2025 03:16:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 47C9968D5CC; Thu, 29 May 2025 06:16:38 +0300 (EEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10olkn2045.outbound.protection.outlook.com [40.92.40.45]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id A40E668D589 for ; Thu, 29 May 2025 06:16:31 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hzSXycyJb8Nz/LZZHNMFbgoACJ3fZpFWahpi6TEhUPfT1Z3qnvEQGMKeB9jtE+B7MuHHfQbGk67PME6ZTOhaIpIWRVYNWcUp3usIOelozwWyhIDFGC/fzBBrUrbtRsKsFta6jqa5KxVL6mepTNVxm4BQQVkfMXTdC+iQkMR8UhPgtTy9Rf/Q7qka1BFkH7rq9cEd8OJPFdlgPxu7RneteQQyZnqFgG3J/dxqQW+82rtmgnpoPvdV9pNOIA9HTbT8igDhJgra0ybCpvHBuqI0QMSaWjlsgcZxK3IIELyPfcvLzhQJF3UAUZ8uHMMNeRVDJ4AxinyCpOv4HHRoWgrr4g== 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=gh3db9ogMsOjI0wbLaS3OqoTOtKW6zr+/u2fcSvqvP0=; b=o7rwMBC4ABssndJKpSAnUQJWMktJv4SpBeJ23MO4+8f9shNBzz1N7SxAoq2oHgXX1XiUcYOGBT8kecrteijnNR1WzykqPYMcwcbdSGWpKf5InO3KpLkny95J0Aovv1ciKZvcwQh5+29ju2ey4xifhmh/4dKfJZq2caf2D4l36TitRjTiPGhuAiD5R49jKPq+zayfhzyzHODVXgLlxOAqsl1BbgCd1DyNwWRl3mGofOLiErUhcqNbeWMcHrR+w+qr/8dErWHrhrdo9IdD0pV0Sx1/x8UrTTbhkdCCNmPzAh39Jz6uXo8q8yniS4qwu3e9ZU3yrnvE8n4KxSLA/d7Njg== 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=gh3db9ogMsOjI0wbLaS3OqoTOtKW6zr+/u2fcSvqvP0=; b=MdXDxNslRUUmHg63VRrEz4K3wKqw+ab1+sFtVEJNj3MhdcQM1uS2orPbzHXfKFwUNYFvXxT3W8qCXZxURrnpuqBjsyAtx5+Ao39W1YOYbCmy/iM5vKYM7p9fLIX1AW6W5z0dsm+QXxKHdkY3yg2tEy6sBXp4AGVyyz0HU19NuGFAtcXetzhvwNn1LmY+EYuyN5ZGgoZdINBSzRLnVoNtOxwnBdSIYwKQtjRqr1fbmIxeicX/Jcs59ILzIoPqGuOvNrtfKuOy8o6CXiHJgtef3O0z+Ioobl3Mze6ZyAkTT42PwzJmzGJpum206cFyzq9s+InU9UbXo7g5Otc/UdOQNg== Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:b::20) by CH0P223MB0075.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:e9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.29; Thu, 29 May 2025 03:16:28 +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.8769.025; Thu, 29 May 2025 03:16:28 +0000 From: "softworkz ." To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_filter: make FilterGraphPriv private again Thread-Index: AQHb0EbJX0baSsD3ikehlOwN9H+V9bPo7pzA Date: Thu, 29 May 2025 03:16:28 +0000 Message-ID: References: <20250529030643.70454-1-jamrial@gmail.com> In-Reply-To: <20250529030643.70454-1-jamrial@gmail.com> 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_|CH0P223MB0075:EE_ x-ms-office365-filtering-correlation-id: 2f17191e-8960-40d5-85de-08dd9e5f33c1 x-ms-exchange-slblob-mailprops: Cq7lScuPrnoSu68Y5FdRDlCPOBk43FEtODO9q+q0qXUnQ+B54Akm/BS7qHO5fEEm1Liei2eNPvrRfI1vxf2Sg8o9BgN+w8o68v1WEIzTxj8t4cBvp1m+mBIuyFOTAXp3tt+usxap9zf78RujtaFoPDi3BoyKplw/yfKQKGCHLFJWVgdngUOYGArMJ7Ic3F5cheFyrSHFGh+UogQXzZkiQN9Sf6YScwMPs9OrJYA/fatr8weWlMWe/fwEnAFudR6E2R7JnehTe7KhVG/vhIJf5QMiUKLvrKBRdWWqTviDXK5rq7jQmRWAQjdh9Ioo/SaapwhQvY7mjNPX86oVDHOG+Vlk/QpwNnM6/cQ/+GB+WUy4f4nYwEPb4J1+zk1YapS1z5xzO/0Gbl2MjsxVzeguID/ZbsyUCROodlX069nfP+5nf09f9+1l1HFQalAsSjRIvltnEyOBp9/3eBhgosV9/W1A7wSsf3WK6EuHkrBdcwQ3pi2Fqm3gQ4hKdUjkh68y7LVaaEqnbgU+vR57wXd/7L8bA9en0gE20FIOKe8ZRXnrIdgT6xPV5OR+/YTr9OEPzmNe0FjnZcOc0w9ZOvGiRzPpj1p5sMnNhkW1921fmkGsvoJ8BqFtxEWPmFQ6EUkmLqYPGtJtboKDwXgclZRQG+aHqiSqZmYvZQZK8O6To40tkh3aIenqbavnRDTR7i/2PMWuEAdrPUTG3OP73pdUSHdyIfpBUb2R2EQHrbcuzIDp3rNhtJPQ+xyWEqikmoSBajvJyyj4ACY= x-microsoft-antispam: BCL:0; ARA:14566002|7092599006|8060799009|8062599006|461199028|41001999006|19110799006|15080799009|440099028|3412199025|102099032|12091999003; x-microsoft-antispam-message-info: =?us-ascii?Q?qtMdblgLq59l8HZDxtI+lJotk+DXFjHgniKn2Tr+VEhD+0/LChOcT0gfB04x?= =?us-ascii?Q?0CEyxP4bndkgCRI5biE9iZkdBxjXOp8b8pn/K8Q2uJAU5xlIJkF7uRY2Lq5t?= =?us-ascii?Q?/fWRgcMrKqmN9j9GnCOGTWCQUd1qjdjfLf55JD1+97I5JUZh6+FLaBPC//MU?= =?us-ascii?Q?h2NE3keJRgQmhmH73r6c98/Vu540d5ZuYAx2U0xTXWI2ZQo3LNJddFQjajIr?= =?us-ascii?Q?uwGIvlP5t33KFcocwaGGCykd9cH/a/+IHa8ua44UqdOvX5x6jkhNWysC7pZY?= =?us-ascii?Q?bqsj7tvH/fis4C6MMN5JVtqtl0zMuo8PDDPHdIgNJ+ie3cdPaW3R7Jn82LG4?= =?us-ascii?Q?7u+eouz82Qnp6vhGJPiIk+xDF7KZ26Rbuq5605JdnWFfzhWWfzWxEQodr1Qo?= =?us-ascii?Q?xh8T87ymJ8UlXbRUWtcBEJ839cCyEtCb8lDrznIF9K+UOCDt2aRsMb2QUbbV?= =?us-ascii?Q?fwMhCNt74UGblgn6wOW1DCv2IQiNYn7/GrPtX0QVvUdBmJVk9d5C2BqFg1eL?= =?us-ascii?Q?GO/rzumngW8c5knTAiQ1QKx1nCDYgb1gJp6VsNyjiQgkm43yq5VvyMHR4J2M?= =?us-ascii?Q?kfplu7tfa+dN6+4DTAIHKsihYxeZOHGRb5LXuk6nDOzrRll7dsuPE6f8irMJ?= =?us-ascii?Q?jGunveEBZMPBP5Fu4uig2RxJ8EV2i7fGXS4j7laHlnf4Zd+bxdoxYLKS7VN2?= =?us-ascii?Q?1dTcIhdJWOzbcA+X/VaJ1QokG16HJCj53G/APTQVEKGAEBFQlkzdP6OIoWxS?= =?us-ascii?Q?wTk7l5Z0qd/IxjASpTwfXaMTPMOyqPy3Leg2wGcKR5AC9o5QzC4PtmkkwAy9?= =?us-ascii?Q?6z2N1ZMbBOc1fRy9qpLmJVqVTPnoekaleh4Rv0AXlt/Ne/OfVz0hXZeElQ+Q?= =?us-ascii?Q?qYe6vsba4RTsP8p5UPvF2u5fwAZXrGHDqyiZtmegbnU3qC0eHz8KQ/jme5t/?= =?us-ascii?Q?tcRZMfded76G+qM4kLWMIWKu2dKP3ldx+9vvTCJMVoCY3W0QVGZ7mt8iHs32?= =?us-ascii?Q?06XU57SV2ywlbrxJgWPMdmhTLESK/Fd/M6P4BXGtGnNUh2SbaNKi6xLMdnxX?= =?us-ascii?Q?AC7PhcSPBPOspMoZTzM9AA14qUWpCz4m2lTT0wJzW3NkMXdZ66k2TKs555uJ?= =?us-ascii?Q?UWxXdXvbtmchJcajbmQW16diX/GdhLoSSgfs3ra9VIUoyBzos+c74L0=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cCy8E/dBUp+EkYm/JMrg2RzOUI3YL1FX5JBwRPcyczZD1zMv/iYVUIT9ihCj?= =?us-ascii?Q?oEdnHGkdGzSaKkFGt+rSlmpujwCNa7PVl4ZaR8Q0WInpBX/djkO9iOTV2Ahb?= =?us-ascii?Q?Dysjqbe7neQ2eh5UVNsKDf5wNXNDN2J9xGoW+lKsZE+qgsVie4NHvTMtY6Nl?= =?us-ascii?Q?RpzpLeEBc6SPKvhFfh0cpPZdxKQXeJYL1fr3pqbzk6Rve47FrmwgBpf27qEl?= =?us-ascii?Q?JbF93mmdgjjxXB4//3RiruRFJTCMRUg+xGYxUB+5vDQwo4hfbV1+vMUm7+I/?= =?us-ascii?Q?8Yp34pl68vxS/aa5AXo/oa+inoG+JMsbYpKnBfLmVQPYDiolsaRlPIWM1G4c?= =?us-ascii?Q?xLzFmYC5ny24L26LMOKd+4BHxYKq02Skwk/mCLJcdKFtfKLgK7pf7iwTuXkT?= =?us-ascii?Q?9gwLZJxhXRcb8FSI7+/nmU9yndvI7O0LW48dfZ+40Wuo4WkVHuTSY4Y6dLR9?= =?us-ascii?Q?u8omMdjuwcoRgxmI+T96UC8NZICWzsld/Vd4Icla0fQNHNBdY/OdCPLB6Mcs?= =?us-ascii?Q?TUmfv6ir3SNzMG/srZ65a/qCt+XqlYMnZc+PSnKcq2ykb32wzMi7GjgkptuR?= =?us-ascii?Q?sDr76mEadpSvyqnqgBWPs3xyJ9Tbv8tsnX7d8lC44F1KbYdScLFASMOUSY1N?= =?us-ascii?Q?etfY4zGMSg4ADKIy0TxIXZImTdorVoKSGVmKq263Lccy3JkcdPzZsqkHmsyu?= =?us-ascii?Q?XERI/JWeNGijW2odw7MxPwbo0QwoQnv/+5ERh9IRideS9/qSSA0pWsQddtEB?= =?us-ascii?Q?DBpEqVdwv7JXsbnVrB/D+bcHfPScU9rspFA2XrjjmkNFcKRH/boqKqS9LXBd?= =?us-ascii?Q?GNUX/94X6uB/3mVwrA1l9RWIkR2pNdfueyTGPXfWcaEwOIMcIFCD/JzwqoAz?= =?us-ascii?Q?kA137rzMqxJTMlTuIO8jWW+GCAX73x8NKwhbhUz9nnKcIpTIc4AnDOF5s9KM?= =?us-ascii?Q?3eYoErzkQ4rcd3X+SVyyiwr8NzxGD+Nq093rdxhzCvOHbJp757rvq3WGFO7q?= =?us-ascii?Q?xjWiOzpvuoHzu0a4IP+tA6XqY8G3ySPpbc/50xLFTbEmytpwKVRC6AO6VEiN?= =?us-ascii?Q?7RojItfhKVkzFXuT5H7UROTQWI02JlSv1NzQZPB4GiuNqUwQsrOgpJtu8S3h?= =?us-ascii?Q?LNUSB/5/hBtfJjN4vCAdnmQEE++tbz2ItkVwQo/l9BkdlylP4MPzWq4VXc/m?= =?us-ascii?Q?YiEfYwqaMdxVQCVEoSJVFmam4DJLMn0KgRSdxVyFj7kkt/aHMRerXOKFbvA?= =?us-ascii?Q?=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-8534-20-msonline-outlook-c7cf3.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: 2f17191e-8960-40d5-85de-08dd9e5f33c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2025 03:16:28.3802 (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: CH0P223MB0075 Subject: Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_filter: make FilterGraphPriv private again X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > -----Original Message----- > From: ffmpeg-devel On Behalf Of > James Almer > Sent: Donnerstag, 29. Mai 2025 05:07 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_filter: make > FilterGraphPriv private again > > As the name implies, it's a struct meant to be internal and private to > the > filter handling code. If a field is required in other modules, then it > can > be moved to the public facing struct, which is done in this commit. > > Signed-off-by: James Almer > --- > fftools/ffmpeg.h | 4 +++ > fftools/ffmpeg_filter.c | 51 ++++++++++++++++++++++++++++++++----- > - > fftools/ffmpeg_filter.h | 42 ------------------------------- > fftools/graph/graphprint.c | 16 +++++------- > 4 files changed, 53 insertions(+), 60 deletions(-) > > diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h > index 7fbf0ad532..641582ae63 100644 > --- a/fftools/ffmpeg.h > +++ b/fftools/ffmpeg.h > @@ -39,6 +39,7 @@ > #include "libavfilter/avfilter.h" > > #include "libavutil/avutil.h" > +#include "libavutil/bprint.h" > #include "libavutil/dict.h" > #include "libavutil/eval.h" > #include "libavutil/fifo.h" > @@ -381,6 +382,9 @@ typedef struct FilterGraph { > int nb_inputs; > OutputFilter **outputs; > int nb_outputs; > + > + const char *graph_desc; > + struct AVBPrint graph_print_buf; > } FilterGraph; > > enum DecoderFlags { > diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c > index b774606562..464e17ca7c 100644 > --- a/fftools/ffmpeg_filter.c > +++ b/fftools/ffmpeg_filter.c > @@ -44,6 +44,42 @@ > // FIXME private header, used for mid_pred() > #include "libavcodec/mathops.h" > > +typedef struct FilterGraphPriv { > + FilterGraph fg; > + > + // name used for logging > + char log_name[32]; > + > + int is_simple; > + // true when the filtergraph contains only meta filters > + // that do not modify the frame data > + int is_meta; > + // source filters are present in the graph > + int have_sources; > + int disable_conversions; > + > + unsigned nb_outputs_done; > + > + int nb_threads; > + > + // frame for temporarily holding output from the filtergraph > + AVFrame *frame; > + // frame for sending output to the encoder > + AVFrame *frame_enc; > + > + Scheduler *sch; > + unsigned sch_idx; > +} FilterGraphPriv; > + > +static FilterGraphPriv *fgp_from_fg(FilterGraph *fg) > +{ > + return (FilterGraphPriv*)fg; > +} > + > +static const FilterGraphPriv *cfgp_from_cfg(const FilterGraph *fg) > +{ > + return (const FilterGraphPriv*)fg; > +} > > // data that is local to the filter thread and not visible outside of > it > typedef struct FilterGraphThread { > @@ -856,7 +892,7 @@ void fg_free(FilterGraph **pfg) > av_freep(&fg->outputs[j]); > } > av_freep(&fg->outputs); > - av_freep(&fgp->graph_desc); > + av_freep(&fg->graph_desc); > > av_frame_free(&fgp->frame); > av_frame_free(&fgp->frame_enc); > @@ -909,7 +945,7 @@ int fg_create(FilterGraph **pfg, char *graph_desc, > Scheduler *sch) > } > > fg->class = &fg_class; > - fgp->graph_desc = graph_desc; > + fg->graph_desc = graph_desc; > fgp->disable_conversions = !auto_conversion_filters; > fgp->nb_threads = -1; > fgp->sch = sch; > @@ -928,7 +964,7 @@ int fg_create(FilterGraph **pfg, char *graph_desc, > Scheduler *sch) > return AVERROR(ENOMEM);; > graph->nb_threads = 1; > > - ret = graph_parse(fg, graph, fgp->graph_desc, &inputs, &outputs, > + ret = graph_parse(fg, graph, fg->graph_desc, &inputs, &outputs, > hw_device_for_filter()); > if (ret < 0) > goto fail; > @@ -1070,7 +1106,6 @@ int fg_create_simple(FilterGraph **pfg, > > static int fg_complex_bind_input(FilterGraph *fg, InputFilter > *ifilter) > { > - FilterGraphPriv *fgp = fgp_from_fg(fg); > InputFilterPriv *ifp = ifp_from_ifilter(ifilter); > InputStream *ist = NULL; > enum AVMediaType type = ifp->type; > @@ -1086,7 +1121,7 @@ static int fg_complex_bind_input(FilterGraph > *fg, InputFilter *ifilter) > dec_idx = strtol(ifp->linklabel + 4, &p, 0); > if (dec_idx < 0 || dec_idx >= nb_decoders) { > av_log(fg, AV_LOG_ERROR, "Invalid decoder index %d in > filtergraph description %s\n", > - dec_idx, fgp->graph_desc); > + dec_idx, fg->graph_desc); > return AVERROR(EINVAL); > } > > @@ -1137,7 +1172,7 @@ static int fg_complex_bind_input(FilterGraph > *fg, InputFilter *ifilter) > file_idx = strtol(ifp->linklabel, &p, 0); > if (file_idx < 0 || file_idx >= nb_input_files) { > av_log(fg, AV_LOG_FATAL, "Invalid file index %d in > filtergraph description %s.\n", > - file_idx, fgp->graph_desc); > + file_idx, fg->graph_desc); > return AVERROR(EINVAL); > } > s = input_files[file_idx]->ctx; > @@ -1171,7 +1206,7 @@ static int fg_complex_bind_input(FilterGraph > *fg, InputFilter *ifilter) > stream_specifier_uninit(&ss); > if (!st) { > av_log(fg, AV_LOG_FATAL, "Stream specifier '%s' in > filtergraph description %s " > - "matches no streams.\n", p, fgp->graph_desc); > + "matches no streams.\n", p, fg->graph_desc); > return AVERROR(EINVAL); > } > ist = input_files[file_idx]->streams[st->index]; > @@ -1733,7 +1768,7 @@ static int configure_filtergraph(FilterGraph > *fg, FilterGraphThread *fgt) > AVFilterInOut *inputs, *outputs, *cur; > int ret = AVERROR_BUG, i, simple = filtergraph_is_simple(fg); > int have_input_eof = 0; > - const char *graph_desc = fgp->graph_desc; > + const char *graph_desc = fg->graph_desc; > > cleanup_filtergraph(fg, fgt); > fgt->graph = avfilter_graph_alloc(); > diff --git a/fftools/ffmpeg_filter.h b/fftools/ffmpeg_filter.h > index 94b94beece..bf690bdc91 100644 > --- a/fftools/ffmpeg_filter.h > +++ b/fftools/ffmpeg_filter.h > @@ -37,48 +37,6 @@ > #include "libavutil/channel_layout.h" > #include "libavutil/downmix_info.h" > > -typedef struct FilterGraphPriv { > - FilterGraph fg; > - > - // name used for logging > - char log_name[32]; > - > - int is_simple; > - // true when the filtergraph contains only meta filters > - // that do not modify the frame data > - int is_meta; > - // source filters are present in the graph > - int have_sources; > - int disable_conversions; > - > - unsigned nb_outputs_done; > - > - const char *graph_desc; > - > - int nb_threads; > - > - // frame for temporarily holding output from the filtergraph > - AVFrame *frame; > - // frame for sending output to the encoder > - AVFrame *frame_enc; > - > - Scheduler *sch; > - unsigned sch_idx; > - > - AVBPrint graph_print_buf; > - > -} FilterGraphPriv; > - > -static inline FilterGraphPriv *fgp_from_fg(FilterGraph *fg) > -{ > - return (FilterGraphPriv*)fg; > -} > - > -static inline const FilterGraphPriv *cfgp_from_cfg(const FilterGraph > *fg) > -{ > - return (const FilterGraphPriv*)fg; > -} > - > typedef struct InputFilterPriv { > InputFilter ifilter; > > diff --git a/fftools/graph/graphprint.c b/fftools/graph/graphprint.c > index 852a8f6c0c..e55c8d7507 100644 > --- a/fftools/graph/graphprint.c > +++ b/fftools/graph/graphprint.c > @@ -479,14 +479,13 @@ static void init_sections(void) > static void print_filtergraph_single(GraphPrintContext *gpc, > FilterGraph *fg, AVFilterGraph *graph) > { > AVTextFormatContext *tfc = gpc->tfc; > - FilterGraphPriv *fgp = fgp_from_fg(fg); > AVDictionary *input_map = NULL; > AVDictionary *output_map = NULL; > > print_int("graph_index", fg->index); > print_fmt("name", "Graph %d.%d", gpc->id_prefix_num, fg->index); > print_fmt("id", "Graph_%d_%d", gpc->id_prefix_num, fg->index); > - print_str("description", fgp->graph_desc); > + print_str("description", fg->graph_desc); > > print_section_header_id(gpc, SECTION_ID_GRAPH_INPUTS, > "Input_File", 0); > > @@ -557,7 +556,7 @@ static void > print_filtergraph_single(GraphPrintContext *gpc, FilterGraph *fg, AV > > if (gpc->is_diagram) { > print_fmt("name", "Graph %d.%d", gpc->id_prefix_num, fg- > >index); > - print_str("description", fgp->graph_desc); > + print_str("description", fg->graph_desc); > print_str("id", sec_ctx.context_id); > } > > @@ -967,11 +966,10 @@ int print_filtergraph(FilterGraph *fg, > AVFilterGraph *graph) > { > GraphPrintContext *gpc = NULL; > AVTextFormatContext *tfc; > - FilterGraphPriv *fgp = fgp_from_fg(fg); > - AVBPrint *target_buf = &fgp->graph_print_buf; > + AVBPrint *target_buf = &fg->graph_print_buf; > int ret; > > - if (!fg || !fgp) { > + if (!fg) { > av_log(NULL, AV_LOG_ERROR, "Invalid filter graph > provided\n"); > return AVERROR(EINVAL); > } > @@ -1035,8 +1033,7 @@ static int print_filtergraphs_priv(FilterGraph > **graphs, int nb_graphs, InputFil > avtext_print_section_header(tfc, NULL, SECTION_ID_FILTERGRAPHS); > > for (int i = 0; i < nb_graphs; i++) { > - FilterGraphPriv *fgp = fgp_from_fg(graphs[i]); > - AVBPrint *graph_buf = &fgp->graph_print_buf; > + AVBPrint *graph_buf = &graphs[i]->graph_print_buf; > > if (graph_buf->len > 0) { > avtext_print_section_header(tfc, NULL, > SECTION_ID_FILTERGRAPH); > @@ -1053,8 +1050,7 @@ static int print_filtergraphs_priv(FilterGraph > **graphs, int nb_graphs, InputFil > OutputStream *ost = of->streams[i]; > > if (ost->fg_simple) { > - FilterGraphPriv *fgp = fgp_from_fg(ost->fg_simple); > - AVBPrint *graph_buf = &fgp->graph_print_buf; > + AVBPrint *graph_buf = &ost->fg_simple- > >graph_print_buf; > > if (graph_buf->len > 0) { > avtext_print_section_header(tfc, NULL, > SECTION_ID_FILTERGRAPH); > -- > 2.49.0 > > _______________________________________________ Hi James, thanks for the patches. Generally, I'm totally fine with this way. It's just that I had expected objections when moving the member fields around. I'll take a closer look at the weekend. Best regards 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".