[vlc-commits] live555: reduce variables scope

Ludovic Fauvet git at videolan.org
Fri Aug 12 12:37:41 CEST 2016


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Fri Aug 12 12:32:59 2016 +0200| [c8ff54b9a5ab5291961ed55d4fb59c0f06633dc5] | committer: Ludovic Fauvet

live555: reduce variables scope

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

 modules/access/live555.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index a1b4f9d..1367b8c 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -1333,11 +1333,11 @@ static int Demux( demux_t *p_demux )
     /* remove the task */
     p_sys->scheduler->unscheduleDelayedTask( task );
 
-    mtime_t i_minpcr = VLC_TS_INVALID;
-    bool b_discontinuity = false;
-
     if( b_send_pcr )
     {
+        mtime_t i_minpcr = VLC_TS_INVALID;
+        bool b_discontinuity = false;
+
         /* Check for gap in pts value */
         for( i = 0; i < p_sys->i_track; i++ )
         {
@@ -1424,7 +1424,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     int64_t *pi64, i64;
     double  *pf, f;
     bool *pb;
-    int *pi_int;
 
     vlc_mutex_locker locker(&p_sys->timeout_mutex); /* (see same in Demux) */
 
@@ -1558,6 +1557,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_SET_RATE:
         {
+            int *pi_int;
             double f_scale, f_old_scale;
 
             if( !p_sys->rtsp || (p_sys->f_npt_length <= 0) ||



More information about the vlc-commits mailing list