[FFmpeg-devel] [PATCH 21/26] avfilter/vf_psnr: Remove always-false format check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Sep 21 09:27:41 EEST 2021


This filter uses ff_set_common_formats_from_list().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavfilter/vf_psnr.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index d254d0cb55..a4ce9a4c4c 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -332,10 +332,6 @@ static int config_input_ref(AVFilterLink *inlink)
         av_log(ctx, AV_LOG_ERROR, "Width and height of input videos must be same.\n");
         return AVERROR(EINVAL);
     }
-    if (ctx->inputs[0]->format != ctx->inputs[1]->format) {
-        av_log(ctx, AV_LOG_ERROR, "Inputs must be of same pixel format.\n");
-        return AVERROR(EINVAL);
-    }
 
     s->max[0] = (1 << desc->comp[0].depth) - 1;
     s->max[1] = (1 << desc->comp[1].depth) - 1;
-- 
2.30.2



More information about the ffmpeg-devel mailing list