diff mbox series

[FFmpeg-devel,5/8] avfilter/vf_scale: Reindentation

Message ID AM7PR03MB6660CE2A472B2FD276695CCA8FAF9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit a228baeee157e2360bca92228f7168be97709335
Headers show
Series [FFmpeg-devel,1/8] avfilter/tests/filtfmts: Replace macro by ordinary function | expand

Checks

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

Commit Message

Andreas Rheinhardt Oct. 5, 2021, 8:53 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_scale.c | 45 +++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 22 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 993fd18620..44f85cb019 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -341,34 +341,35 @@  static av_cold void uninit(AVFilterContext *ctx)
 static int query_formats(AVFilterContext *ctx)
 {
     AVFilterFormats *formats;
+    const AVPixFmtDescriptor *desc;
     enum AVPixelFormat pix_fmt;
     int ret;
 
-        const AVPixFmtDescriptor *desc = NULL;
-        formats = NULL;
-        while ((desc = av_pix_fmt_desc_next(desc))) {
-            pix_fmt = av_pix_fmt_desc_get_id(desc);
-            if ((sws_isSupportedInput(pix_fmt) ||
-                 sws_isSupportedEndiannessConversion(pix_fmt))
-                && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
-                return ret;
-            }
-        }
-        if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0)
+    desc    = NULL;
+    formats = NULL;
+    while ((desc = av_pix_fmt_desc_next(desc))) {
+        pix_fmt = av_pix_fmt_desc_get_id(desc);
+        if ((sws_isSupportedInput(pix_fmt) ||
+             sws_isSupportedEndiannessConversion(pix_fmt))
+            && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
             return ret;
-
-        desc    = NULL;
-        formats = NULL;
-        while ((desc = av_pix_fmt_desc_next(desc))) {
-            pix_fmt = av_pix_fmt_desc_get_id(desc);
-            if ((sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8 ||
-                 sws_isSupportedEndiannessConversion(pix_fmt))
-                && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
-                return ret;
-            }
         }
-        if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
+    }
+    if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0)
+        return ret;
+
+    desc    = NULL;
+    formats = NULL;
+    while ((desc = av_pix_fmt_desc_next(desc))) {
+        pix_fmt = av_pix_fmt_desc_get_id(desc);
+        if ((sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8 ||
+             sws_isSupportedEndiannessConversion(pix_fmt))
+            && (ret = ff_add_format(&formats, pix_fmt)) < 0) {
             return ret;
+        }
+    }
+    if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
+        return ret;
 
     return 0;
 }