Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 6/8] avfilter/avfilter: Move init_state to FilterLinkInternal
Date: Wed, 14 Feb 2024 18:25:35 +0100
Message-ID: <AS8P250MB07443FA079237CB98E536EAE8F4E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB074450C1E5A33DE788104EE68F4E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/avfilter.c      | 7 ++++---
 libavfilter/avfilter.h      | 7 -------
 libavfilter/link_internal.h | 7 +++++++
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 796ec29afd..a3f8c403c3 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -323,6 +323,7 @@ int avfilter_config_links(AVFilterContext *filter)
     for (i = 0; i < filter->nb_inputs; i ++) {
         AVFilterLink *link = filter->inputs[i];
         AVFilterLink *inlink;
+        FilterLinkInternal *li = ff_link_internal(link);
 
         if (!link) continue;
         if (!link->src || !link->dst) {
@@ -335,14 +336,14 @@ int avfilter_config_links(AVFilterContext *filter)
         link->current_pts =
         link->current_pts_us = AV_NOPTS_VALUE;
 
-        switch (link->init_state) {
+        switch (li->init_state) {
         case AVLINK_INIT:
             continue;
         case AVLINK_STARTINIT:
             av_log(filter, AV_LOG_INFO, "circular filter chain detected\n");
             return 0;
         case AVLINK_UNINIT:
-            link->init_state = AVLINK_STARTINIT;
+            li->init_state = AVLINK_STARTINIT;
 
             if ((ret = avfilter_config_links(link->src)) < 0)
                 return ret;
@@ -413,7 +414,7 @@ int avfilter_config_links(AVFilterContext *filter)
                     return ret;
                 }
 
-            link->init_state = AVLINK_INIT;
+            li->init_state = AVLINK_INIT;
         }
     }
 
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 1d2909e28d..5c6e34e8fc 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -611,13 +611,6 @@ struct AVFilterLink {
      */
     AVFilterFormatsConfig outcfg;
 
-    /** stage of the initialization of the link properties (dimensions, etc) */
-    enum {
-        AVLINK_UNINIT = 0,      ///< not started
-        AVLINK_STARTINIT,       ///< started, but incomplete
-        AVLINK_INIT             ///< complete
-    } init_state;
-
     /**
      * Graph the filter belongs to.
      */
diff --git a/libavfilter/link_internal.h b/libavfilter/link_internal.h
index b5a8ac89ec..030eb24765 100644
--- a/libavfilter/link_internal.h
+++ b/libavfilter/link_internal.h
@@ -59,6 +59,13 @@ typedef struct FilterLinkInternal {
      * corresponding code.
      */
     int status_out;
+
+    /** stage of the initialization of the link properties (dimensions, etc) */
+    enum {
+        AVLINK_UNINIT = 0,      ///< not started
+        AVLINK_STARTINIT,       ///< started, but incomplete
+        AVLINK_INIT             ///< complete
+    } init_state;
 } FilterLinkInternal;
 
 static inline FilterLinkInternal *ff_link_internal(AVFilterLink *link)
-- 
2.34.1

_______________________________________________
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".

  parent reply	other threads:[~2024-02-14 17:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 17:24 [FFmpeg-devel] [PATCH 1/8] avfilter/avfilter: Avoid allocation for AVFilterInternal Andreas Rheinhardt
2024-02-14 17:25 ` [FFmpeg-devel] [PATCH 2/8] avfilter: Add a header for internal generic-layer APIs Andreas Rheinhardt
2024-02-14 17:25 ` [FFmpeg-devel] [PATCH 3/8] avfilter/avfiltergraph: Avoid indirection when freeing filtergraph Andreas Rheinhardt
2024-02-14 17:25 ` [FFmpeg-devel] [PATCH 4/8] avfilter/avfiltergraph: Avoid allocation for AVFilterGraphInternal Andreas Rheinhardt
2024-02-14 17:25 ` [FFmpeg-devel] [PATCH 5/8] avfilter/avfilter: Move AVFilterGraph private fields to FFFilterGraph Andreas Rheinhardt
2024-02-14 17:25 ` Andreas Rheinhardt [this message]
2024-02-14 17:25 ` [FFmpeg-devel] [PATCH 7/8] avfilter/avfilter: Move age_index to FilterLinkInternal Andreas Rheinhardt
2024-02-14 17:25 ` [FFmpeg-devel] [PATCH 8/8] avfilter/avfilter: Move frame_pool " Andreas Rheinhardt
2024-02-17 21:14 ` [FFmpeg-devel] [PATCH 1/8] avfilter/avfilter: Avoid allocation for AVFilterInternal Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS8P250MB07443FA079237CB98E536EAE8F4E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git