avfilter/vf_maskedmerge: use time_base from framesync
authorPaul B Mahol <onemda@gmail.com>
Wed, 3 Jul 2019 12:35:18 +0000 (14:35 +0200)
committerPaul B Mahol <onemda@gmail.com>
Wed, 3 Jul 2019 12:54:05 +0000 (14:54 +0200)
Fixes non-monotonous timestamps.

libavfilter/vf_maskedmerge.c

index 1a02503..30e0cd0 100644 (file)
@@ -246,7 +246,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;
 
@@ -272,7 +271,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)