aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-02-06 11:05:55 +0100
committerPaul B Mahol <onemda@gmail.com>2021-02-06 11:34:28 +0100
commit3583d2a837bfe676c66603fcbcff1487f976f100 (patch)
tree5766b43562140b3683677009e6652d38eb2f0f2a
parente28b6e04480fc6d2ec9a6a65e84c204c029bd15b (diff)
downloadffmpeg-3583d2a837bfe676c66603fcbcff1487f976f100.tar.gz
avfilter/vf_mix: add timeline support
-rw-r--r--libavfilter/vf_mix.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c
index 1ae73124f6..84ecfcac9a 100644
--- a/libavfilter/vf_mix.c
+++ b/libavfilter/vf_mix.c
@@ -201,6 +201,14 @@ static int process_frame(FFFrameSync *fs)
return ret;
}
+ if (ctx->is_disabled) {
+ out = av_frame_clone(s->frames[0]);
+ if (!out)
+ return AVERROR(ENOMEM);
+ out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
+ return ff_filter_frame(outlink, out);
+ }
+
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out)
return AVERROR(ENOMEM);
@@ -337,7 +345,8 @@ AVFilter ff_vf_mix = {
.init = init,
.uninit = uninit,
.activate = activate,
- .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS,
+ .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS |
+ AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
};
#endif /* CONFIG_MIX_FILTER */