[vlc-commits] Switcher: avoid use of unset variable

Jean-Baptiste Kempf git at videolan.org
Mon Oct 31 00:42:30 CET 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Oct 29 19:02:34 2011 +0200| [20acb53f18eed70b981c63e0caea051b0c6fae7d] | committer: Jean-Baptiste Kempf

Switcher: avoid use of unset variable

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

 modules/stream_out/switcher.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c
index 9909040..2732086 100644
--- a/modules/stream_out/switcher.c
+++ b/modules/stream_out/switcher.c
@@ -509,8 +509,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
 
         while ( id->p_queued != NULL )
         {
-            mtime_t i_dts;
-            int i;
+            mtime_t i_dts = 0;
 
             if ( p_sys->i_old_cmd != p_sys->i_cmd )
             {
@@ -519,7 +518,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
 
             i_dts = Process( p_stream, id, i_dts );
 
-            for ( i = 0; i < MAX_AUDIO; i++ )
+            for ( int i = 0; i < MAX_AUDIO; i++ )
             {
                 if ( p_sys->pp_audio_ids[i] != NULL )
                     Process( p_stream, p_sys->pp_audio_ids[i], i_dts );



More information about the vlc-commits mailing list