aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-12-17 13:28:27 +0100
committerPaul B Mahol <onemda@gmail.com>2019-12-17 13:30:16 +0100
commit3530fdc78ed8ca6f246dcaeb761bea0f5b76fc44 (patch)
treed92d9709444943a6255c1b55f59b64b14ca86322
parent0f50be625f156e49ce3a2eac9b794a29fdcad4ab (diff)
downloadffmpeg-3530fdc78ed8ca6f246dcaeb761bea0f5b76fc44.tar.gz
avfilter/vf_stack: set framerate to VFR when inputs frame rates differs
-rw-r--r--libavfilter/vf_stack.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index b9e87a4429..5bc4ccf6ed 100644
--- a/libavfilter/vf_stack.c
+++ b/libavfilter/vf_stack.c
@@ -310,6 +310,17 @@ static int config_output(AVFilterLink *outlink)
outlink->frame_rate = frame_rate;
outlink->sample_aspect_ratio = sar;
+ for (i = 1; i < s->nb_inputs; i++) {
+ AVFilterLink *inlink = ctx->inputs[i];
+ if (outlink->frame_rate.num != inlink->frame_rate.num ||
+ outlink->frame_rate.den != inlink->frame_rate.den) {
+ av_log(ctx, AV_LOG_VERBOSE,
+ "Video inputs have different frame rates, output will be VFR\n");
+ outlink->frame_rate = av_make_q(1, 0);
+ break;
+ }
+ }
+
if ((ret = ff_framesync_init(&s->fs, ctx, s->nb_inputs)) < 0)
return ret;