[vlc-commits] DecoderFixTs: deindent, cosmetics

Rafaël Carré git at videolan.org
Mon Mar 5 10:36:41 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Mar  5 02:56:35 2012 -0500| [6e8a6d28d31c4533bf4b29337f4a6e655f005943] | committer: Rafaël Carré

DecoderFixTs: deindent, cosmetics

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e8a6d28d31c4533bf4b29337f4a6e655f005943
---

 src/input/decoder.c |   50 +++++++++++++++++++++++++-------------------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index fb7034b..7d2aa2b 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1082,35 +1082,35 @@ static void DecoderFixTs( decoder_t *p_dec, mtime_t *pi_ts0, mtime_t *pi_ts1,
 
     const mtime_t i_es_delay = p_owner->i_ts_delay;
 
-    if( p_clock )
-    {
-        const bool b_ephemere = pi_ts1 && *pi_ts0 == *pi_ts1;
-        int i_rate;
+    if( !p_clock )
+        return;
 
-        if( *pi_ts0 > VLC_TS_INVALID )
-        {
-            *pi_ts0 += i_es_delay;
-            if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
-                *pi_ts1 += i_es_delay;
-            if( input_clock_ConvertTS( p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) )
-                *pi_ts0 = VLC_TS_INVALID;
-        }
-        else
-        {
-            i_rate = input_clock_GetRate( p_clock );
-        }
+    const bool b_ephemere = pi_ts1 && *pi_ts0 == *pi_ts1;
+    int i_rate;
 
-        /* Do not create ephemere data because of rounding errors */
-        if( !b_ephemere && pi_ts1 && *pi_ts0 == *pi_ts1 )
-            *pi_ts1 += 1;
+    if( *pi_ts0 > VLC_TS_INVALID )
+    {
+        *pi_ts0 += i_es_delay;
+        if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
+            *pi_ts1 += i_es_delay;
+        if( input_clock_ConvertTS( p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) )
+            *pi_ts0 = VLC_TS_INVALID;
+    }
+    else
+    {
+        i_rate = input_clock_GetRate( p_clock );
+    }
 
-        if( pi_duration )
-            *pi_duration = ( *pi_duration * i_rate +
-                                    INPUT_RATE_DEFAULT-1 ) / INPUT_RATE_DEFAULT;
+    /* Do not create ephemere data because of rounding errors */
+    if( !b_ephemere && pi_ts1 && *pi_ts0 == *pi_ts1 )
+        *pi_ts1 += 1;
 
-        if( pi_rate )
-            *pi_rate = i_rate;
-    }
+    if( pi_duration )
+        *pi_duration = ( *pi_duration * i_rate + INPUT_RATE_DEFAULT-1 )
+            / INPUT_RATE_DEFAULT;
+
+    if( pi_rate )
+        *pi_rate = i_rate;
 }
 
 static bool DecoderIsExitRequested( decoder_t *p_dec )



More information about the vlc-commits mailing list