diff mbox series

[FFmpeg-devel,5/5] avcodec/rl2: Fix indentation

Message ID GV1P250MB0737878670903BBE030508158F549@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 5f02a261a2ddca7c79198869b45d35019baac819
Headers show
Series [FFmpeg-devel,1/5] avcodec/rl2: Remove wrong check | expand

Checks

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

Commit Message

Andreas Rheinhardt Sept. 28, 2022, 4:35 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/rl2.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c
index 7938ef1d92..e427a27dce 100644
--- a/libavcodec/rl2.c
+++ b/libavcodec/rl2.c
@@ -62,7 +62,6 @@  static void rl2_rle_decode(Rl2Context *s, const uint8_t *in, int size,
     int base_x = video_base % s->avctx->width;
     int base_y = video_base / s->avctx->width;
     ptrdiff_t stride_adj = stride - s->avctx->width;
-    int i;
     const uint8_t *back_frame = s->back_frame;
     const uint8_t *in_end     = in + size;
     const uint8_t *out_end    = out + stride * s->avctx->height - stride_adj;
@@ -70,12 +69,12 @@  static void rl2_rle_decode(Rl2Context *s, const uint8_t *in, int size,
 
     /** copy start of the background frame */
     if (s->back_frame) {
-    for (i = 0; i <= base_y; i++) {
+        for (int i = 0; i <= base_y; i++) {
             memcpy(out, back_frame, s->avctx->width);
-        out        += stride;
-        back_frame += s->avctx->width;
-    }
-    back_frame += base_x - s->avctx->width;
+            out        += stride;
+            back_frame += s->avctx->width;
+        }
+        back_frame += base_x - s->avctx->width;
     } else {
         out += stride * (base_y + 1);
     }
@@ -121,8 +120,8 @@  static void rl2_rle_decode(Rl2Context *s, const uint8_t *in, int size,
             if (out == line_end) {
                 if (out == out_end)
                     return;
-                 out      += stride_adj;
-                 line_end += stride;
+                out      += stride_adj;
+                line_end += stride;
             }
         }
     }