[FFmpeg-cvslog] fftools/ffmpeg_filter: drop OutputFilter.ost

Anton Khirnov git at videolan.org
Tue Apr 9 11:54:56 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Apr  4 11:35:26 2024 +0200| [d74cbcb9635f1c94f990dae4988a060ec6494f34] | committer: Anton Khirnov

fftools/ffmpeg_filter: drop OutputFilter.ost

All remaining code accessing it only needs to know whether this
filtergraph output has been bound or not.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d74cbcb9635f1c94f990dae4988a060ec6494f34
---

 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;



More information about the ffmpeg-cvslog mailing list