[FFmpeg-cvslog] fftools/ffmpeg_filter: track input/output index in {Input,Output}FilterPriv

Anton Khirnov git at videolan.org
Wed Dec 6 11:43:45 EET 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Nov  3 15:24:36 2023 +0100| [1d536e028372218681d57100c546adfc805c3faa] | committer: Anton Khirnov

fftools/ffmpeg_filter: track input/output index in {Input,Output}FilterPriv

Will be useful in following commits.

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

 fftools/ffmpeg_filter.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index b7da105141..0f7c076d59 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -74,6 +74,8 @@ static const FilterGraphPriv *cfgp_from_cfg(const FilterGraph *fg)
 typedef struct InputFilterPriv {
     InputFilter ifilter;
 
+    int              index;
+
     AVFilterContext *filter;
 
     InputStream *ist;
@@ -162,6 +164,8 @@ typedef struct FPSConvContext {
 typedef struct OutputFilterPriv {
     OutputFilter        ofilter;
 
+    int                 index;
+
     AVFilterContext    *filter;
 
     /* desired output stream properties */
@@ -594,6 +598,7 @@ static OutputFilter *ofilter_alloc(FilterGraph *fg)
     ofilter           = &ofp->ofilter;
     ofilter->graph    = fg;
     ofp->format       = -1;
+    ofp->index        = fg->nb_outputs - 1;
     ofilter->last_pts = AV_NOPTS_VALUE;
 
     return ofilter;
@@ -787,6 +792,7 @@ static InputFilter *ifilter_alloc(FilterGraph *fg)
     if (!ifp->frame)
         return NULL;
 
+    ifp->index           = fg->nb_inputs - 1;
     ifp->format          = -1;
     ifp->fallback.format = -1;
 



More information about the ffmpeg-cvslog mailing list