fftools/ffmpeg_filter: track input/output index in {Input,Output}FilterPriv
Will be useful in following commits.
This commit is contained in:
@@ -74,6 +74,8 @@ static const FilterGraphPriv *cfgp_from_cfg(const FilterGraph *fg)
|
|||||||
typedef struct InputFilterPriv {
|
typedef struct InputFilterPriv {
|
||||||
InputFilter ifilter;
|
InputFilter ifilter;
|
||||||
|
|
||||||
|
int index;
|
||||||
|
|
||||||
AVFilterContext *filter;
|
AVFilterContext *filter;
|
||||||
|
|
||||||
InputStream *ist;
|
InputStream *ist;
|
||||||
@@ -162,6 +164,8 @@ typedef struct FPSConvContext {
|
|||||||
typedef struct OutputFilterPriv {
|
typedef struct OutputFilterPriv {
|
||||||
OutputFilter ofilter;
|
OutputFilter ofilter;
|
||||||
|
|
||||||
|
int index;
|
||||||
|
|
||||||
AVFilterContext *filter;
|
AVFilterContext *filter;
|
||||||
|
|
||||||
/* desired output stream properties */
|
/* desired output stream properties */
|
||||||
@@ -594,6 +598,7 @@ static OutputFilter *ofilter_alloc(FilterGraph *fg)
|
|||||||
ofilter = &ofp->ofilter;
|
ofilter = &ofp->ofilter;
|
||||||
ofilter->graph = fg;
|
ofilter->graph = fg;
|
||||||
ofp->format = -1;
|
ofp->format = -1;
|
||||||
|
ofp->index = fg->nb_outputs - 1;
|
||||||
ofilter->last_pts = AV_NOPTS_VALUE;
|
ofilter->last_pts = AV_NOPTS_VALUE;
|
||||||
|
|
||||||
return ofilter;
|
return ofilter;
|
||||||
@@ -787,6 +792,7 @@ static InputFilter *ifilter_alloc(FilterGraph *fg)
|
|||||||
if (!ifp->frame)
|
if (!ifp->frame)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
ifp->index = fg->nb_inputs - 1;
|
||||||
ifp->format = -1;
|
ifp->format = -1;
|
||||||
ifp->fallback.format = -1;
|
ifp->fallback.format = -1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user