[FFmpeg-cvslog] avfilter/vf_mix: add timeline support
Paul B Mahol
git at videolan.org
Sat Feb 6 12:35:24 EET 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Feb 6 11:05:55 2021 +0100| [3583d2a837bfe676c66603fcbcff1487f976f100] | committer: Paul B Mahol
avfilter/vf_mix: add timeline support
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3583d2a837bfe676c66603fcbcff1487f976f100
---
libavfilter/vf_mix.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
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 */
More information about the ffmpeg-cvslog
mailing list