[vlc-commits] remoteosd: use memset()

Rémi Denis-Courmont git at videolan.org
Thu Jul 9 20:34:18 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul  9 20:54:48 2015 +0300| [a45052aa53c79e5361b19de8fac06ce610338c91] | committer: Rémi Denis-Courmont

remoteosd: use memset()

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

 modules/video_filter/remoteosd.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/modules/video_filter/remoteosd.c b/modules/video_filter/remoteosd.c
index 11dbd64..9396eb1 100644
--- a/modules/video_filter/remoteosd.c
+++ b/modules/video_filter/remoteosd.c
@@ -256,13 +256,8 @@ static int CreateFilter ( vlc_object_t *p_this )
 
     p_sys->i_alpha = var_CreateGetIntegerCommand( p_this, RMTOSD_CFG "alpha" );
 
-    for ( int i = 0; i < 256; i++ )
-    {
-        p_sys->ar_color_table_yuv[i][0] = 255;
-        p_sys->ar_color_table_yuv[i][1] = 255;
-        p_sys->ar_color_table_yuv[i][2] = 255;
-        p_sys->ar_color_table_yuv[i][3] = 255;
-    }
+    memset( p_sys->ar_color_table_yuv, 255,
+            sizeof( p_sys->ar_color_table_yuv ) );
 
     /* Keep track of OSD Events */
     p_sys->b_need_update  = false;



More information about the vlc-commits mailing list