Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-10-25 23:02:41 +0300
committerPaul B Mahol <onemda@gmail.com>2019-10-25 23:02:41 +0300
commit9e283aa24eca9d387e5fbc61230962cb18f3dc30 (patch)
treede90d2b35ccf927fb9e3ace3f58d53c014de7885 /libavfilter/vf_ssim.c
parent0481a1f6e5b8737c4fbc67794fd3a24cfcf34594 (diff)
avfilter/vf_psnr,vf_ssim: add warning if different timebases are encountered
Diffstat (limited to 'libavfilter/vf_ssim.c')
-rw-r--r--libavfilter/vf_ssim.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
index 4c957f41a3..c08fbcdcc2 100644
--- a/libavfilter/vf_ssim.c
+++ b/libavfilter/vf_ssim.c
@@ -443,6 +443,14 @@ static int config_output(AVFilterLink *outlink)
if ((ret = ff_framesync_configure(&s->fs)) < 0)
return ret;
+ outlink->time_base = s->fs.time_base;
+
+ if (av_cmp_q(mainlink->time_base, outlink->time_base) &&
+ av_cmp_q(ctx->inputs[1]->time_base, outlink->time_base))
+ av_log(ctx, AV_LOG_WARNING, "not matching timebases found between first input: %d/%d and second input %d/%d, results may be incorrect!\n",
+ mainlink->time_base.num, mainlink->time_base.den,
+ ctx->inputs[1]->time_base.num, ctx->inputs[1]->time_base.den);
+
return 0;
}