From d8ca8bec2664ea95451207e807c854c76d8fefcb Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 11 Sep 2021 15:07:49 +0200 Subject: avfilter/vf_hflip: Don't call av_pix_fmt_desc_get() twice Reviewed-by: Paul B Mahol Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_hflip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index 7b5650a821..fa3fd72bd9 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -46,10 +46,10 @@ AVFILTER_DEFINE_CLASS(hflip); static int query_formats(AVFilterContext *ctx) { AVFilterFormats *pix_fmts = NULL; + const AVPixFmtDescriptor *desc; int fmt, ret; - for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) { - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); + for (fmt = 0; desc = av_pix_fmt_desc_get(fmt); fmt++) { if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL || desc->flags & AV_PIX_FMT_FLAG_BITSTREAM || (desc->log2_chroma_w != desc->log2_chroma_h && -- cgit v1.2.3