summaryrefslogtreecommitdiff
path: root/libavfilter/vf_guided.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-05-02 23:26:08 +0200
committerPaul B Mahol <onemda@gmail.com>2022-05-02 23:47:24 +0200
commitccd29bf8814937e30c36f676e1ba3ea500c6ba23 (patch)
treed56fb6505216de05f2ed4c01de06a0e0cfba7dc2 /libavfilter/vf_guided.c
parente40cec0609f5323de8d85c1658b7339880ee232e (diff)
downloadffmpeg-ccd29bf8814937e30c36f676e1ba3ea500c6ba23.tar.gz
avfilter/vf_guided: fix timeline support
Diffstat (limited to 'libavfilter/vf_guided.c')
-rw-r--r--libavfilter/vf_guided.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c
index 893a247ac4..45e124b2ed 100644
--- a/libavfilter/vf_guided.c
+++ b/libavfilter/vf_guided.c
@@ -338,6 +338,9 @@ static int process_frame(FFFrameSync *fs)
if (ret < 0)
return ret;
+ if (ctx->is_disabled)
+ return ff_filter_frame(outlink, main_frame);
+
ret = filter_frame(ctx, &out_frame, main_frame, ref_frame);
if (ret < 0) {
return ret;
@@ -406,6 +409,9 @@ static int activate(AVFilterContext *ctx)
FF_FILTER_FORWARD_STATUS_BACK(ctx->outputs[0], ctx->inputs[0]);
if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &frame)) > 0) {
+ if (ctx->is_disabled)
+ return ff_filter_frame(ctx->outputs[0], frame);
+
ret = filter_frame(ctx, &out, frame, frame);
av_frame_free(&frame);
if (ret < 0)
@@ -476,6 +482,6 @@ const AVFilter ff_vf_guided = {
FILTER_OUTPUTS(guided_outputs),
FILTER_PIXFMTS_ARRAY(pix_fmts),
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS |
- AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
+ AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
.process_command = ff_filter_process_command,
};