[vlc-commits] es_out: avoid shadowing

Rémi Denis-Courmont git at videolan.org
Wed Aug 13 20:29:12 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 13 20:44:37 2014 +0300| [5ac8a36d986c556ce4c6f4b4c7b41f3ec7ce9251] | committer: Rémi Denis-Courmont

es_out: avoid shadowing

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

 src/input/es_out.c |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index d5ac33b..fba5c87 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -827,21 +827,19 @@ static void EsOutFrameNext( es_out_t *out )
 static mtime_t EsOutGetBuffering( es_out_t *out )
 {
     es_out_sys_t *p_sys = out->p_sys;
+    mtime_t i_stream_duration, i_system_start;
 
     if( !p_sys->p_pgrm )
         return 0;
+    else
+    {
+        mtime_t i_stream_start, i_system_duration;
 
-    int i_ret;
-    mtime_t i_stream_start;
-    mtime_t i_system_start;
-    mtime_t i_stream_duration;
-    mtime_t i_system_duration;
-    i_ret = input_clock_GetState( p_sys->p_pgrm->p_clock,
+        if( input_clock_GetState( p_sys->p_pgrm->p_clock,
                                   &i_stream_start, &i_system_start,
-                                  &i_stream_duration, &i_system_duration );
-
-    if( i_ret )
-        return 0;
+                                  &i_stream_duration, &i_system_duration ) )
+            return 0;
+    }
 
     mtime_t i_delay;
 
@@ -852,6 +850,7 @@ static mtime_t EsOutGetBuffering( es_out_t *out )
     else
     {
         mtime_t i_system_duration;
+
         if( p_sys->b_paused )
         {
             i_system_duration = p_sys->i_pause_date  - i_system_start;



More information about the vlc-commits mailing list