avfilter/dualinput: Add support to skip initial unpaired frames
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9981b70da5
commit
f1dabc958e
@ -66,6 +66,9 @@ int ff_dualinput_init(AVFilterContext *ctx, FFDualInputContext *s)
|
|||||||
in[1].after = EXT_NULL;
|
in[1].after = EXT_NULL;
|
||||||
in[1].sync = 0;
|
in[1].sync = 0;
|
||||||
}
|
}
|
||||||
|
if (s->skip_initial_unpaired) {
|
||||||
|
in[1].before = EXT_STOP;
|
||||||
|
}
|
||||||
|
|
||||||
return ff_framesync_configure(&s->fs);
|
return ff_framesync_configure(&s->fs);
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ typedef struct {
|
|||||||
AVFrame *(*process)(AVFilterContext *ctx, AVFrame *main, const AVFrame *second);
|
AVFrame *(*process)(AVFilterContext *ctx, AVFrame *main, const AVFrame *second);
|
||||||
int shortest; ///< terminate stream when the second input terminates
|
int shortest; ///< terminate stream when the second input terminates
|
||||||
int repeatlast; ///< repeat last second frame
|
int repeatlast; ///< repeat last second frame
|
||||||
|
int skip_initial_unpaired; ///< Skip initial frames that do not have a 2nd input
|
||||||
} FFDualInputContext;
|
} FFDualInputContext;
|
||||||
|
|
||||||
int ff_dualinput_init(AVFilterContext *ctx, FFDualInputContext *s);
|
int ff_dualinput_init(AVFilterContext *ctx, FFDualInputContext *s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user