avfilter/vf_scale: Remove always-true checks

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-10-05 21:52:49 +02:00
parent 812a4b86a8
commit 04f8d79c24
1 changed files with 2 additions and 5 deletions

View File

@ -344,7 +344,6 @@ static int query_formats(AVFilterContext *ctx)
enum AVPixelFormat pix_fmt; enum AVPixelFormat pix_fmt;
int ret; int ret;
if (ctx->inputs[0]) {
const AVPixFmtDescriptor *desc = NULL; const AVPixFmtDescriptor *desc = NULL;
formats = NULL; formats = NULL;
while ((desc = av_pix_fmt_desc_next(desc))) { while ((desc = av_pix_fmt_desc_next(desc))) {
@ -357,9 +356,8 @@ static int query_formats(AVFilterContext *ctx)
} }
if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0) if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0)
return ret; return ret;
}
if (ctx->outputs[0]) { desc = NULL;
const AVPixFmtDescriptor *desc = NULL;
formats = NULL; formats = NULL;
while ((desc = av_pix_fmt_desc_next(desc))) { while ((desc = av_pix_fmt_desc_next(desc))) {
pix_fmt = av_pix_fmt_desc_get_id(desc); pix_fmt = av_pix_fmt_desc_get_id(desc);
@ -371,7 +369,6 @@ static int query_formats(AVFilterContext *ctx)
} }
if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0) if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
return ret; return ret;
}
return 0; return 0;
} }