diff mbox series

[FFmpeg-devel,31/38] avfilter/vf_hflip: Don't call av_pix_fmt_desc_get() twice

Message ID AM7PR03MB6660A4B5300273860DCD10F18FD89@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit d8ca8bec2664ea95451207e807c854c76d8fefcb
Headers show
Series [FFmpeg-devel,01/39] avfilter/vf_maskedminmax: Simplify init | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

Andreas Rheinhardt Sept. 12, 2021, 10:53 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_hflip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paul B Mahol Sept. 13, 2021, 11:51 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index bdff052b45..e15cf22f9e 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -39,10 +39,10 @@ 
 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 &&