From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id ED6884513A for ; Fri, 5 Apr 2024 16:15:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B6ECF68D28F; Fri, 5 Apr 2024 19:13:28 +0300 (EEST) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5F73B68D1AC for ; Fri, 5 Apr 2024 19:13:10 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=sBsCrlhL; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 402F34D88 for ; Fri, 5 Apr 2024 18:13:08 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id h3EQIRtjurDD for ; Fri, 5 Apr 2024 18:13:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1712333583; bh=qNzgtm4Ys5p8ywgXNMugEuQwGRJucnBc8lMh7hDmh6k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sBsCrlhLqzY5VENLgvaK2BNsoWhFq4gqcpKult5PfnXgfutDauf01yV3R9REcV49U +E36tCing3NDO2/6HQbK+NIz7N068G/9ZBlBmEvFkv0fgKHTFknAadRsgeizhU69pU N5m78eLz2flKjQZ1WlezVAXZOcf8qbv/42nhYS+LbuWuL7589zhnEtF/JgoN/3uqXT ZUmF1kiiSJmTOM29fCJ/RMj4GaVEnjGni7AWsdovVdcdvANGtJlKn7409LVLXFm1B7 e8V4R1b6ukOO1p1+Fu/BLWXo9SFXGF8hzOEcfndeoZLkTheM1Z4tSUnVPxkayxMO+q +V58KCWj1+rHA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id A42564D9E for ; Fri, 5 Apr 2024 18:13:03 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id A49843A186D for ; Fri, 5 Apr 2024 18:12:56 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 5 Apr 2024 18:12:07 +0200 Message-ID: <20240405161212.26167-26-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240405161212.26167-1-anton@khirnov.net> References: <20240405161212.26167-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 26/31] fftools/ffmpeg_filter: drop OutputFilter.ost 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: All remaining code accessing it only needs to know whether this filtergraph output has been bound or not. --- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_filter.c | 6 +++--- fftools/ffmpeg_mux_init.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index f77ec956b3..6446a141b5 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -314,12 +314,12 @@ typedef struct InputFilter { typedef struct OutputFilter { const AVClass *class; - struct OutputStream *ost; struct FilterGraph *graph; uint8_t *name; /* for filters that are not yet bound to an output stream, * this stores the output linklabel, if any */ + int bound; uint8_t *linklabel; char *apad; diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 9fc6e32960..3988cf5fc2 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -806,10 +806,10 @@ int ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost, FilterGraphPriv *fgp = fgp_from_fg(fg); int ret; - av_assert0(!ofilter->ost); + av_assert0(!ofilter->bound); av_assert0(ofilter->type == ost->type); - ofilter->ost = ost; + ofilter->bound = 1; av_freep(&ofilter->linklabel); ofp->flags = opts->flags; @@ -1279,7 +1279,7 @@ int fg_finalise_bindings(FilterGraph *fg) for (int i = 0; i < fg->nb_outputs; i++) { OutputFilter *output = fg->outputs[i]; - if (!output->ost) { + if (!output->bound) { av_log(filtergraphs[i], AV_LOG_FATAL, "Filter %s has an unconnected output\n", output->name); return AVERROR(EINVAL); diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 10421ae1b0..6d8bd5bcdf 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1827,7 +1827,7 @@ static int create_streams(Muxer *mux, const OptionsContext *o) for (int j = 0; j < fg->nb_outputs; j++) { OutputFilter *ofilter = fg->outputs[j]; - if (ofilter->linklabel || ofilter->ost) + if (ofilter->linklabel || ofilter->bound) continue; auto_disable |= 1 << ofilter->type; -- 2.43.0 _______________________________________________ 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".