[vlc-devel] [PATCH V3 09/19] clock: re-indent after last commit

Thomas Guillem thomas at gllm.fr
Fri Sep 6 17:20:39 CEST 2019


No functional changes.
---
 src/clock/clock.c | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/clock/clock.c b/src/clock/clock.c
index e2295a527d..3249cdb31e 100644
--- a/src/clock/clock.c
+++ b/src/clock/clock.c
@@ -174,28 +174,29 @@ static vlc_tick_t vlc_clock_master_update(vlc_clock_t *clock,
      * but only notify the new clock point. */
     if (system_now != INT64_MAX)
     {
-    if (main_clock->offset != VLC_TICK_INVALID && ts != main_clock->last.stream)
-    {
-        /* We have a reference so we can update coeff */
-        double instant_coeff = (system_now - main_clock->last.system)
-                             / (double)(ts - main_clock->last.stream);
-        if (rate == main_clock->rate)
+        if (main_clock->offset != VLC_TICK_INVALID
+         && ts != main_clock->last.stream)
         {
-            instant_coeff *= rate;
-            AvgUpdate(&main_clock->coeff_avg, instant_coeff);
-            main_clock->coeff = AvgGet(&main_clock->coeff_avg);
+            /* We have a reference so we can update coeff */
+            double instant_coeff = (system_now - main_clock->last.system)
+                                 / (double)(ts - main_clock->last.stream);
+            if (rate == main_clock->rate)
+            {
+                instant_coeff *= rate;
+                AvgUpdate(&main_clock->coeff_avg, instant_coeff);
+                main_clock->coeff = AvgGet(&main_clock->coeff_avg);
+            }
         }
-    }
-    else
-        main_clock->wait_sync_ref =
-            clock_point_Create(VLC_TICK_INVALID, VLC_TICK_INVALID);
+        else
+            main_clock->wait_sync_ref =
+                clock_point_Create(VLC_TICK_INVALID, VLC_TICK_INVALID);
 
-    main_clock->offset = system_now - ts * main_clock->coeff / rate;
+        main_clock->offset = system_now - ts * main_clock->coeff / rate;
 
-    main_clock->last = clock_point_Create(system_now, ts);
+        main_clock->last = clock_point_Create(system_now, ts);
 
-    main_clock->rate = rate;
-    vlc_cond_broadcast(&main_clock->cond);
+        main_clock->rate = rate;
+        vlc_cond_broadcast(&main_clock->cond);
     }
 
     original_ts = vlc_clock_main_update_origin(main_clock, original_ts);
-- 
2.20.1



More information about the vlc-devel mailing list