Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 4/4] lavfi/framesync: reindent after previous commit
Date: Fri, 27 Jan 2023 14:16:39 +0100
Message-ID: <20230127131639.4928-4-anton@khirnov.net> (raw)
In-Reply-To: <20230127131639.4928-1-anton@khirnov.net>

---
 libavfilter/framesync.c | 56 ++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

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;
     }
-- 
2.35.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2023-01-27 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 13:16 [FFmpeg-devel] [PATCH 1/4] lavfi/framesync: use a local variable to shorten code Anton Khirnov
2023-01-27 13:16 ` [FFmpeg-devel] [PATCH 2/4] lavfi/framesync: reorder functions to avoid a forward declaration Anton Khirnov
2023-01-27 14:47   ` Nicolas George
2023-01-27 13:16 ` [FFmpeg-devel] [PATCH 3/4] lavfi/framesync: add syncing via external timestamp map Anton Khirnov
2023-01-27 13:22   ` Paul B Mahol
2023-01-27 14:53   ` Nicolas George
2023-01-27 16:45     ` Anton Khirnov
2023-01-30 11:01       ` Nicolas George
2023-01-27 13:16 ` Anton Khirnov [this message]
2023-01-27 14:39 ` [FFmpeg-devel] [PATCH 1/4] lavfi/framesync: use a local variable to shorten code Nicolas George

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230127131639.4928-4-anton@khirnov.net \
    --to=anton@khirnov.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git