diff mbox series

[FFmpeg-devel,4/4] lavfi/framesync: reindent after previous commit

Message ID 20230127131639.4928-4-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,1/4] lavfi/framesync: use a local variable to shorten code | expand

Checks

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

Commit Message

Anton Khirnov Jan. 27, 2023, 1:16 p.m. UTC
---
 libavfilter/framesync.c | 56 ++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 28 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/framesync.c b/libavfilter/framesync.c
index b52cf318c0..9986b04e48 100644
--- a/libavfilter/framesync.c
+++ b/libavfilter/framesync.c
@@ -368,35 +368,35 @@  static int framesync_advance(FFFrameSync *fs)
             }
             pts = fs->in[0].pts;
         } else {
-        pts = INT64_MAX;
-        for (i = 0; i < fs->nb_in; i++)
-            if (fs->in[i].have_next && fs->in[i].pts_next < pts)
-                pts = fs->in[i].pts_next;
-        if (pts == INT64_MAX) {
-            framesync_eof(fs);
-            break;
-        }
-        for (i = 0; i < fs->nb_in; i++) {
-            FFFrameSyncIn * const in = &fs->in[i];
-
-            if (in->pts_next == pts ||
-                (in->ts_mode == TS_NEAREST && in->have_next             &&
-                 in->pts_next != INT64_MAX && in->pts != AV_NOPTS_VALUE &&
-                 in->pts_next - pts < pts - in->pts) ||
-                (in->before == EXT_INFINITY && in->state == STATE_BOF)) {
-                frame_advance(in);
-                in->state      = in->frame ? STATE_RUN : STATE_EOF;
-                if (in->sync == fs->sync_level && in->frame)
-                    fs->frame_ready = 1;
-                if (in->state == STATE_EOF && in->after == EXT_STOP)
-                    framesync_eof(fs);
-            }
-        }
-        if (fs->frame_ready)
+            pts = INT64_MAX;
             for (i = 0; i < fs->nb_in; i++)
-                if ((fs->in[i].state == STATE_BOF &&
-                     fs->in[i].before == EXT_STOP))
-                    fs->frame_ready = 0;
+                if (fs->in[i].have_next && fs->in[i].pts_next < pts)
+                    pts = fs->in[i].pts_next;
+            if (pts == INT64_MAX) {
+                framesync_eof(fs);
+                break;
+            }
+            for (i = 0; i < fs->nb_in; i++) {
+                FFFrameSyncIn * const in = &fs->in[i];
+
+                if (in->pts_next == pts ||
+                    (in->ts_mode == TS_NEAREST && in->have_next             &&
+                     in->pts_next != INT64_MAX && in->pts != AV_NOPTS_VALUE &&
+                     in->pts_next - pts < pts - in->pts) ||
+                    (in->before == EXT_INFINITY && in->state == STATE_BOF)) {
+                    frame_advance(in);
+                    in->state      = in->frame ? STATE_RUN : STATE_EOF;
+                    if (in->sync == fs->sync_level && in->frame)
+                        fs->frame_ready = 1;
+                    if (in->state == STATE_EOF && in->after == EXT_STOP)
+                        framesync_eof(fs);
+                }
+            }
+            if (fs->frame_ready)
+                for (i = 0; i < fs->nb_in; i++)
+                    if ((fs->in[i].state == STATE_BOF &&
+                         fs->in[i].before == EXT_STOP))
+                        fs->frame_ready = 0;
         }
         fs->pts = pts;
     }