[FFmpeg-devel] [PATCH 09/24] fftools/ffmpeg_filter: track input/output index in {Input, Output}FilterPriv
Anton Khirnov
anton at khirnov.net
Sat Nov 4 09:56:18 EET 2023
Will be useful in following commits.
---
fftools/ffmpeg_filter.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index d48974581b..4edf634b26 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;
--
2.42.0
More information about the ffmpeg-devel
mailing list