diff mbox series

[FFmpeg-devel,07/22] fftools/ffmpeg_demux: reindent after previous commit

Message ID 20230508091738.20813-7-anton@khirnov.net
State Accepted
Commit bfd5e7ef5d99c6b8b94b9b94312ba30624001bd8
Headers show
Series [FFmpeg-devel,01/22] fftools/ffmpeg: consolidate InputStream.[next_]dts updates | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Anton Khirnov May 8, 2023, 9:17 a.m. UTC
---
 fftools/ffmpeg_demux.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 9082de6a80..d49bb8317c 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -481,20 +481,20 @@  fail:
 static void readrate_sleep(Demuxer *d)
 {
     InputFile *f = &d->f;
-        int64_t file_start = copy_ts * (
-                              (f->start_time_effective != AV_NOPTS_VALUE ? f->start_time_effective * !start_at_zero : 0) +
-                              (f->start_time != AV_NOPTS_VALUE ? f->start_time : 0)
-                             );
-        int64_t burst_until = AV_TIME_BASE * d->readrate_initial_burst;
-        for (int i = 0; i < f->nb_streams; i++) {
-            InputStream *ist = f->streams[i];
-            int64_t stream_ts_offset, pts, now;
-            stream_ts_offset = FFMAX(ist->first_dts != AV_NOPTS_VALUE ? ist->first_dts : 0, file_start);
-            pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE);
-            now = (av_gettime_relative() - ist->start) * f->readrate + stream_ts_offset;
-            if (pts - burst_until > now)
-                av_usleep(pts - burst_until - now);
-        }
+    int64_t file_start = copy_ts * (
+                          (f->start_time_effective != AV_NOPTS_VALUE ? f->start_time_effective * !start_at_zero : 0) +
+                          (f->start_time != AV_NOPTS_VALUE ? f->start_time : 0)
+                         );
+    int64_t burst_until = AV_TIME_BASE * d->readrate_initial_burst;
+    for (int i = 0; i < f->nb_streams; i++) {
+        InputStream *ist = f->streams[i];
+        int64_t stream_ts_offset, pts, now;
+        stream_ts_offset = FFMAX(ist->first_dts != AV_NOPTS_VALUE ? ist->first_dts : 0, file_start);
+        pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE);
+        now = (av_gettime_relative() - ist->start) * f->readrate + stream_ts_offset;
+        if (pts - burst_until > now)
+            av_usleep(pts - burst_until - now);
+    }
 }
 
 static void thread_set_name(InputFile *f)