[FFmpeg-cvslog] avfilter/vf_guided: fix timeline support

Paul B Mahol git at videolan.org
Tue May 3 00:46:26 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon May  2 23:26:08 2022 +0200| [ccd29bf8814937e30c36f676e1ba3ea500c6ba23] | committer: Paul B Mahol

avfilter/vf_guided: fix timeline support

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

 libavfilter/vf_guided.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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,
 };



More information about the ffmpeg-cvslog mailing list