diff mbox series

[FFmpeg-devel,13/13] fftools/ffmpeg: cosmetics

Message ID 20221126081911.31275-13-anton@khirnov.net
State Accepted
Commit becbb22eb032149836070d13edf6b92f87780b35
Headers show
Series [FFmpeg-devel,01/13] fftools/ffmpeg: stop explicitly closing decoders | 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 Nov. 26, 2022, 8:19 a.m. UTC
Reindent after previous commit and break/split some lines as
appropriate.
---
 fftools/ffmpeg.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 045cc609b9..771219f7df 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -688,18 +688,17 @@  static double adjust_frame_pts_to_encoder_tb(OutputFile *of, OutputStream *ost,
     if (frame->pts == AV_NOPTS_VALUE)
         goto early_exit;
 
-        tb.den <<= extra_bits;
-        float_pts =
-            av_rescale_q(frame->pts, filter_tb, tb) -
-            av_rescale_q(start_time, AV_TIME_BASE_Q, tb);
-        float_pts /= 1 << extra_bits;
-        // avoid exact midoints to reduce the chance of rounding differences, this can be removed in case the fps code is changed to work with integers
-        float_pts += FFSIGN(float_pts) * 1.0 / (1<<17);
-
-        frame->pts =
-            av_rescale_q(frame->pts, filter_tb, enc->time_base) -
-            av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base);
-        frame->time_base = enc->time_base;
+    tb.den <<= extra_bits;
+    float_pts = av_rescale_q(frame->pts, filter_tb, tb) -
+                av_rescale_q(start_time, AV_TIME_BASE_Q, tb);
+    float_pts /= 1 << extra_bits;
+    // avoid exact midoints to reduce the chance of rounding differences, this
+    // can be removed in case the fps code is changed to work with integers
+    float_pts += FFSIGN(float_pts) * 1.0 / (1<<17);
+
+    frame->pts = av_rescale_q(frame->pts, filter_tb, enc->time_base) -
+                 av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base);
+    frame->time_base = enc->time_base;
 
 early_exit: