diff mbox series

[FFmpeg-devel,06/18] fftools/ffmpeg_enc: reindent after previous commit

Message ID 20230826151144.24858-6-anton@khirnov.net
State Accepted
Commit 8b6b2518faf6fab23f9993498e71ab4fa1f1b812
Headers show
Series [FFmpeg-devel,01/18] fftools/ffmpeg: stop explicitly closing output streams on input EOF | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Aug. 26, 2023, 3:11 p.m. UTC
---
 fftools/ffmpeg_enc.c | 66 ++++++++++++++++++++++----------------------
 1 file changed, 33 insertions(+), 33 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index c4874b4d78..4b5bd3d9b4 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -228,44 +228,44 @@  static int enc_choose_timebase(OutputStream *ost, AVFrame *frame)
         return 0;
     }
 
-        fr = ost->frame_rate;
-        if (!fr.num)
-            fr = fd->frame_rate_filter;
-        if (!fr.num && !ost->max_frame_rate.num) {
-            fr = (AVRational){25, 1};
-            av_log(ost, AV_LOG_WARNING,
-                   "No information "
-                   "about the input framerate is available. Falling "
-                   "back to a default value of 25fps. Use the -r option "
-                   "if you want a different framerate.\n");
-        }
+    fr = ost->frame_rate;
+    if (!fr.num)
+        fr = fd->frame_rate_filter;
+    if (!fr.num && !ost->max_frame_rate.num) {
+        fr = (AVRational){25, 1};
+        av_log(ost, AV_LOG_WARNING,
+               "No information "
+               "about the input framerate is available. Falling "
+               "back to a default value of 25fps. Use the -r option "
+               "if you want a different framerate.\n");
+    }
 
-        if (ost->max_frame_rate.num &&
-            (av_q2d(fr) > av_q2d(ost->max_frame_rate) ||
-            !fr.den))
-            fr = ost->max_frame_rate;
+    if (ost->max_frame_rate.num &&
+        (av_q2d(fr) > av_q2d(ost->max_frame_rate) ||
+        !fr.den))
+        fr = ost->max_frame_rate;
 
-        if (enc->codec->supported_framerates && !ost->force_fps) {
-            int idx = av_find_nearest_q_idx(fr, enc->codec->supported_framerates);
-            fr = enc->codec->supported_framerates[idx];
-        }
-        // reduce frame rate for mpeg4 to be within the spec limits
-        if (enc->codec_id == AV_CODEC_ID_MPEG4) {
-            av_reduce(&fr.num, &fr.den,
-                      fr.num, fr.den, 65535);
-        }
+    if (enc->codec->supported_framerates && !ost->force_fps) {
+        int idx = av_find_nearest_q_idx(fr, enc->codec->supported_framerates);
+        fr = enc->codec->supported_framerates[idx];
+    }
+    // reduce frame rate for mpeg4 to be within the spec limits
+    if (enc->codec_id == AV_CODEC_ID_MPEG4) {
+        av_reduce(&fr.num, &fr.den,
+                  fr.num, fr.den, 65535);
+    }
 
-        if (av_q2d(fr) > 1e3 && ost->vsync_method != VSYNC_PASSTHROUGH &&
-            (ost->vsync_method == VSYNC_CFR || ost->vsync_method == VSYNC_VSCFR ||
-            (ost->vsync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS)))){
-            av_log(ost, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"
-                                        "Please consider specifying a lower framerate, a different muxer or "
-                                        "setting vsync/fps_mode to vfr\n");
-        }
+    if (av_q2d(fr) > 1e3 && ost->vsync_method != VSYNC_PASSTHROUGH &&
+        (ost->vsync_method == VSYNC_CFR || ost->vsync_method == VSYNC_VSCFR ||
+        (ost->vsync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS)))){
+        av_log(ost, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"
+                                    "Please consider specifying a lower framerate, a different muxer or "
+                                    "setting vsync/fps_mode to vfr\n");
+    }
 
-        enc->framerate = fr;
+    enc->framerate = fr;
 
-        ost->st->avg_frame_rate = fr;
+    ost->st->avg_frame_rate = fr;
 
     if (!(tb.num > 0 && tb.den > 0))
         tb = av_inv_q(fr);