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 A8E344D219 for ; Sat, 31 May 2025 01:42:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id DB04068D482; Sat, 31 May 2025 04:42:38 +0300 (EEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2062.outbound.protection.outlook.com [40.92.20.62]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 8436868D478 for ; Sat, 31 May 2025 04:42:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c9kv0ov8NGiqtEzjksKFAin1iLxVD6vOxMNhbGyc+ZA4EBpQzOaHTo28QEZZ7HlPsiMROOZ6iLNPAxIdGK0QQ7oxjUtSkfoqUw1n3l8jj/fkHi2xJJq3lQYobjpLMs/ac2agbpk+THxs6PIMWf4hFGZq6+7SOUEqraIm1uqLv3LcU17NSBrz/WV96o6rREFPqkkKABYQ4vN4ujO7TasjNodDe0Kzgq8GU5jpwKTYVbNE0SPDrb10HHdVPbXlBkC5ytlaDIXIrs6LkUDMaNb15pHBskyKDhNfILnfNWsqsUzB9hwbLd2CWPoxBvEW0tvFLW3xilYoDdT/TIrirgIDnA== 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=lws1M/ownheLKgMeVYEPpHiffgMNgShtuo/pZDgATx8=; b=QpPCDsRA9pkIc+VgrD6tAJ26N60jGhFlqBkEs6fIsNOdKdJuoCdo13e+xV889u8iI8kjcMJkU6c2IvdHG81QWxs0sr7wzY74Uz1UaQKKF/sKKujL6Tfqr9VpbHgBaKjeHk6/ZqK8IXJ/uZa6iK2u/eU5rL9e7Y3Mq9zy7SwHY0WWXY5jYh2PKQdBthdhywJh+bkeP+V+Pv9OLS4XBihKFmqbyB7WcAYrcpsi4IBQVjERUKK1vWxQRTCczPQOQsDICKEd2Avd0d9cSnXBJ5X2eEYluooBPUy/Bw87xPulOAvEy+C9f37K1wbIaoQJCoNzRpqNmfYwZFPrj1yNNDMmoQ== 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=lws1M/ownheLKgMeVYEPpHiffgMNgShtuo/pZDgATx8=; b=W7dVf4fo0BT+r37/HYYvE90nIqK7bIhU0Ryd8ltJAd9A18CnNqNLg6K+4ee5r2nrhhHZmUJOPQ75foVvZcAOsFy5l1Ubbvf3h7uhPikafrz4xRzo2CtjM+Zy/8z9uAqaqsunoMBSqIPrJLODT5jPY4VKQJXy7mlRCXMHB6p8Nq2xf16mBpPwYP9h7n4B69LWaMTW3/QJRssRlDLjPcmzbqlnUqqn1ClZlxQ6anD3jq1GtJ0lZec1deUO1vstJ8uYq3epF6ML2LmZ3V3I7Ys2eRegc8s4BK73wwRX8pU6QkSXE/Ac39EMXbiiEivB8AqC2dixqu7U00evg7dNRal95Q== Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:b::20) by PH8P223MB0601.NAMP223.PROD.OUTLOOK.COM (2603:10b6:510:1c4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.26; Sat, 31 May 2025 01:42:29 +0000 Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::bf09:8e9:b07f:98a7]) by DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::bf09:8e9:b07f:98a7%7]) with mapi id 15.20.8769.031; Sat, 31 May 2025 01:42: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+V9bPr2x5A Date: Sat, 31 May 2025 01:42: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_|PH8P223MB0601:EE_ x-ms-office365-filtering-correlation-id: 31ce3836-4e40-4144-ec33-08dd9fe4671e x-ms-exchange-slblob-mailprops: Cq7lScuPrnoSu68Y5FdRDlCPOBk43FEtODO9q+q0qXVlYAycjt3w2KL3hfUGIEdXECdHLuwFArp2ubGv1eWmx5BaeDAXVaL9s5iLKDO3LFBXi0dEe9Uvj5yL3DmrgQ0nzL4E8dir9LJG1UpX9Q5h2lhGYTpyVPw9ZXfZdi6a+fGXMPZ524nm/uh/vT/9C4bKIoMM9dkSXQjboVPt4ihFgt5RiG5RceR9Fwkm0pKASz2eszCIKlTBlbULi+fEIT60HAOpQfZg++S4o4kuBOEvs/TzF0KzukPnr0IQcEtOD7sX5cRs/UepUbTjexFU5bhdhSLVpbs1haOaoTG0MHJwwJwlZXolHnkbttOWCuSvbrYNPXI6dNNFZLjCisnrbvOHQR/8ivGlZ3h5oPkoKvHmMPhh/TWF19K35OXrXd3H7zl9hLwPfw0OFWFZuVB+MwTexn0SfRB5ZDUuA9RbumBqK0RyrUt1ycOQFfQHPOoLAj72SUkLdfhAev7wpQEbeVdIFfzsJz3pH4I/ZeaQl93wE1is6k4xSkWC6JFOhw88VJm2Y0Ky+R/TBT/+7a/eRKERtrp3f1uhYtc0VXsilpc+uBV2dfGbC5GBYcxG9j+Vv9tiYu0fzmOec18wgkE062YwJANrnMSVBGjYZZ9njJ9RNwALcAn4F1BfjcXl2WrwXih6A2rHMODYfh+KfAZ4p6KcnZSqSmV/dZV1qQtWjf4cCwS96W7DFco/3fatiIaH/r6SAzTMI07NPIOjSfqLz3v+kxn+ClLxVJg= x-microsoft-antispam: BCL:0; ARA:14566002|8062599006|461199028|8060799009|7092599006|41001999006|19110799006|15080799009|440099028|3412199025|12091999003|102099032; x-microsoft-antispam-message-info: =?us-ascii?Q?4+pKkxOvFWPiXpJlZyDUSRhaDp6aemkAnpneuwnujDWb7CISBbTQFDlqahIO?= =?us-ascii?Q?1tvGQVTE8gX4m94DSxyAXfPni7GQ4Czcm1Lh9M6GoZ8pnGSUMX1nckSX7oWF?= =?us-ascii?Q?KQc9YiaTh6h3PYA0YQAo2woCnDfjV7+zI7cO7UOhw5/wA+Oo9ecD68FFUUEy?= =?us-ascii?Q?/i62ZSzSODbKha0gbfRS/HaR4VmQfSQN2gvx/iUEIOGoFLFYGHuDcOSDVZFX?= =?us-ascii?Q?i2NdMOhqCT07eQnLsqjbiJ1Mn5HxaCFN7hylymR/hbIDdwwjC7+TZRDWn5GG?= =?us-ascii?Q?/DZZL6Arueu060sOg77ewpzBctxvenO0iuiBVu1SOpIvapz6Yis/l5hTto0u?= =?us-ascii?Q?CL/PvAIZXwNAcHVqPb4FAUoY2ak9q5OcI1GRoWJvDQuorVe9ecEIH0BImtah?= =?us-ascii?Q?2gn6CHakZX1qjifIAzCb2v/qnXMvd2d6OAO1qGP0fkI3Ve0hbY4WnY/uGQxq?= =?us-ascii?Q?DkAd+tBf1e8DPYD/eFVvssH2S9/k/cP/Jy2L6OgHMy1X1tz3g6OqDTX791vu?= =?us-ascii?Q?ahSmrdrvR/bSO81VNujxrdRVDQKDxP5VilPjVazI9NildJ2MBe9wLj/eexIx?= =?us-ascii?Q?b5ysotpfd9EkBrYh6B3OIw8cD94mnzFfbtyGDf6vNAkD6XTh3wzYWzf7PzHH?= =?us-ascii?Q?nOhDPMbZl6QRcvkMiO3e1qi9a3dU8m3rSQGoKSn7v/JWiy7HbPhdz6IDtSJT?= =?us-ascii?Q?1b6MHd3qsCixM3OyXXHWV+BNPqlGBIA487eBtkITJ/z624y0DEug7h+obWbH?= =?us-ascii?Q?r4gkDPiidhl+QWaneOaIQGmNp7RSRGfJwDfB/5QhdyZH3+3d5Fw9GD6dArIK?= =?us-ascii?Q?6R6PlwG+Y69zUKuDRk+2A9xKfNuGfGawBRXMzXfFKE3hulBjaOxLsKrH0hoP?= =?us-ascii?Q?0Dv+jvslhFtMnK+BVwZUEnt3OshQNnF+RYu+CjKBn9qboltaYkjRHfHTs5b9?= =?us-ascii?Q?/avJNQSH16FuUoIbtFG8Jli/S3Xe5YJe6g/d4+bCwD0VZMxs5NQ7d/+g4BVB?= =?us-ascii?Q?4hl8roolfnFMDwYOC514+gsAbbcsXLcMJ/mhYAPQwGlRT86sCMwCL9i4onpK?= =?us-ascii?Q?l4W4eK0DxPXQmRbTnUuW9pYDBU5TDZO/RYLsqDv0eEDxdVExUhmyBYaU/3Zz?= =?us-ascii?Q?p2AXCzZV8YyoY8cofilcXlUBEOthU9VxqGSAm3+tZgBuJKKZUk8Vu9E=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PSYI5WBO3KF1xwjSexKLT8ifp0E61a5IefN44Yt6e/wHxDiQ/d0e9epvqvEt?= =?us-ascii?Q?oAi3JjeIg0HsdkIhWkl4w3VpqdI/f5uB5z6QQdoDfi7Mzn1Kk5+Ny+RMpUw4?= =?us-ascii?Q?dXpVPXEnTgDQKTNpB22RmVYjIgd6UNk/DiQJLGKKdXv+R4Wsz+1Xqw5Eh7s9?= =?us-ascii?Q?2aGrgukQr0HtN02tlkZTsPShOdKAiHCWttimdB1NsQlD1EAGSUd8eZzndE+L?= =?us-ascii?Q?djx8vliUbmHYEJPa21nsyQeWE3ODQfVc2RwSYtLbAlCae9w/Fv9ox73cBfJU?= =?us-ascii?Q?3ybazVw9nIq1YICM3kd1bPf3bZaQUXZEwlpi3Q22lDdLj3m6qvLLSQG2sB4X?= =?us-ascii?Q?+pDqPgM9UmqAmbPgaAS/n6jGXf5TgA1Twyq8EJoNsmlwygal5uNuX+YI/FgH?= =?us-ascii?Q?a+tONFDUTci+Hcz6fjs3bWMjTUwpm9GBulot3fHcHLKn84k1F3tdQFXD68nK?= =?us-ascii?Q?cH2SHB4rzg+XRFfMDNrI0fHHoEjfvAwAGZAS/Cg1Hm6GY3QudeEEObCqv8e0?= =?us-ascii?Q?0kUfDkIxhRIUzvfFh1gWryUKywjQVLd3ztRFpHMMW06ihcLSlCqxuI1ICXiO?= =?us-ascii?Q?ooTAVJhWWILr2a0NewdTgwfcX8xvu5qYXsRRg4Fcfct5H0Fg5XQ5qM8Qzx8f?= =?us-ascii?Q?enCOmBYt9xqOVMjVRNjV/kK1zAXaJQaawzX0pRqHMnSi7SZrkkMPDgMNbiH0?= =?us-ascii?Q?TOMyhxAABNc/k3jRhIvmUvclmRvyK7A/ZUdUyoFJJr5ROtWuaARXmYRblDWa?= =?us-ascii?Q?wzJihAEHVS2hngLELySnmhrj7/+S1e41Xa2b4f/VB9qsMMlgsR6c6IPYCFJQ?= =?us-ascii?Q?V7jgkkkd4bWy651TsmPWemE6P/eJWVMPVE1vZiBPdG8esGtLVi/x9cx/qvtp?= =?us-ascii?Q?xWHN70JnV4wc+45uQCQBOypSycy6Jb39ClUT9LZi8iXRkbVORZ3hd85ThUsL?= =?us-ascii?Q?8ndbBYegAQn1UPPLkdWWnMkkx8VMBpyZuF9zDlpOLKgWEIoPSJ9X29258eia?= =?us-ascii?Q?kTam0DRnbbxmyJBTCPcrA0WMx3itFYtpG/6SS4UZ4WyEIE3NwEjMKREPO347?= =?us-ascii?Q?a77Bv3h4cXIqL4EoXl9chR1t2DK8cta0Uulnn0Vc7XkeepUFCeIVwSzwfOU6?= =?us-ascii?Q?WiKAdvZyQFAVYfpBSoRVtWFVQxn3VEvdESfUe9K75bYaxDyMUj+dEl9Y/MvN?= =?us-ascii?Q?LEvOiJ2XEHUgqkF0zB2CvNrl9ngWq+U5RLH3/49dH5Q1HWihHWy8X1AsJi0?= =?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: 31ce3836-4e40-4144-ec33-08dd9fe4671e X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2025 01:42:28.7689 (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: PH8P223MB0601 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); > -- LGTM & tested successfully (this patch only). Thanks, 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".