From 3d78ad43f781833207dd4a27ca4df0b61dbe7bb4 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 14 Jul 2019 17:28:04 +0200 Subject: [PATCH] avfilter/vf_threshold: use time_base from framesync Fixes non-monotonous timestamps. --- libavfilter/vf_threshold.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_threshold.c b/libavfilter/vf_threshold.c index cf2535d452..ee29c88ef5 100644 --- a/libavfilter/vf_threshold.c +++ b/libavfilter/vf_threshold.c @@ -277,7 +277,6 @@ static int config_output(AVFilterLink *outlink) outlink->w = base->w; outlink->h = base->h; - outlink->time_base = base->time_base; outlink->sample_aspect_ratio = base->sample_aspect_ratio; outlink->frame_rate = base->frame_rate; @@ -304,7 +303,10 @@ static int config_output(AVFilterLink *outlink) s->fs.opaque = s; s->fs.on_event = process_frame; - return ff_framesync_configure(&s->fs); + ret = ff_framesync_configure(&s->fs); + outlink->time_base = s->fs.time_base; + + return ret; } static int activate(AVFilterContext *ctx)