]> git.sesse.net Git - vlc/commitdiff
DecoderFixTs: deindent, cosmetics
authorRafaël Carré <funman@videolan.org>
Mon, 5 Mar 2012 07:56:35 +0000 (02:56 -0500)
committerRafaël Carré <funman@videolan.org>
Mon, 5 Mar 2012 07:56:35 +0000 (02:56 -0500)
src/input/decoder.c

index fb7034bae5eec80de4de4fbd2c28bec56b68c311..7d2aa2b71f34e9f6095a893805a2a7cd123a9af3 100644 (file)
@@ -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 )