[vlc-commits] video_filter: mosaic: use C99 loop declarations

Tristan Matthews git at videolan.org
Mon Aug 31 20:11:01 CEST 2015


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Mon Aug 31 12:42:56 2015 -0400| [e6d066c602e16029c77dc56064b96d4f06189a62] | committer: Tristan Matthews

video_filter: mosaic: use C99 loop declarations

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

 modules/video_filter/mirror.c |    3 +--
 modules/video_filter/mosaic.c |    9 ++++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/video_filter/mirror.c b/modules/video_filter/mirror.c
index 8ec9cf5..1cf5778 100644
--- a/modules/video_filter/mirror.c
+++ b/modules/video_filter/mirror.c
@@ -186,7 +186,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 {
     picture_t *p_outpic;
     bool b_vertical_split, b_left_to_right;
-    int i_index;
 
     if( !p_pic ) return NULL;
 
@@ -202,7 +201,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         return NULL;
     }
 
-    for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
+    for( int i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
     {
         if ( b_vertical_split )
             VerticalMirror( p_pic, p_outpic, i_index, b_left_to_right );
diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c
index df5b4b3..e3c918a 100644
--- a/modules/video_filter/mosaic.c
+++ b/modules/video_filter/mosaic.c
@@ -433,7 +433,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     filter_sys_t *p_sys = p_filter->p_sys;
     bridge_t *p_bridge;
 
-    int i_index, i_real_index, i_row, i_col;
+    int i_real_index, i_row, i_col;
     int i_greatest_real_index_used = p_sys->i_order_length - 1;
 
     unsigned int col_inner_width, row_inner_height;
@@ -486,7 +486,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     if ( p_sys->i_position == position_auto )
     {
         int i_numpics = p_sys->i_order_length; /* keep slots and all */
-        for ( i_index = 0; i_index < p_bridge->i_es_num; i_index++ )
+        for( int i_index = 0; i_index < p_bridge->i_es_num; i_index++ )
         {
             bridged_es_t *p_es = p_bridge->pp_es[i_index];
             if ( !p_es->b_empty )
@@ -496,8 +496,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
                 {
                     /* We also want to leave slots for images given in
                      * mosaic-order that are not available in p_vout_picture */
-                    int i;
-                    for( i = 0; i < p_sys->i_order_length ; i++ )
+                    for( int i = 0; i < p_sys->i_order_length ; i++ )
                     {
                         if( !strcmp( p_sys->ppsz_order[i], p_es->psz_id ) )
                         {
@@ -522,7 +521,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
 
     i_real_index = 0;
 
-    for ( i_index = 0; i_index < p_bridge->i_es_num; i_index++ )
+    for( int i_index = 0; i_index < p_bridge->i_es_num; i_index++ )
     {
         bridged_es_t *p_es = p_bridge->pp_es[i_index];
         video_format_t fmt_in, fmt_out;



More information about the vlc-commits mailing list