[vlc-commits] video_filter_marq: fix strncmp length.

Rémi Duraffort git at videolan.org
Mon Feb 21 22:23:24 CET 2011


vlc/vlc-1.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Feb 20 10:57:51 2011 +0100| [cd19e8c80e66d21b4176f663b3511c94c5125037] | committer: Rémi Duraffort

video_filter_marq: fix strncmp length.

The comment seems to be irrelevant (the variable is called marq-color and not marq-col).
(cherry picked from commit 1b447443c9db0ec1d6b1952fd30cba8edc2b47df)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 modules/video_filter/marq.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/video_filter/marq.c b/modules/video_filter/marq.c
index 196c34a..3dbe705 100644
--- a/modules/video_filter/marq.c
+++ b/modules/video_filter/marq.c
@@ -346,7 +346,7 @@ static int MarqueeCallback( vlc_object_t *p_this, char const *psz_var,
     VLC_UNUSED(p_this);
 
     vlc_mutex_lock( &p_sys->lock );
-    if( !strncmp( psz_var, "marq-marquee", 7 ) )
+    if( !strncmp( psz_var, "marq-marquee", 12 ) )
     {
         free( p_sys->psz_marquee );
         p_sys->psz_marquee = strdup( newval.psz_string );
@@ -359,15 +359,15 @@ static int MarqueeCallback( vlc_object_t *p_this, char const *psz_var,
     {
         p_sys->i_yoff = newval.i_int;
     }
-    else if ( !strncmp( psz_var, "marq-color", 8 ) )  /* "marq-col" */
+    else if ( !strncmp( psz_var, "marq-color", 10 ) )
     {
         p_sys->p_style->i_font_color = newval.i_int;
     }
-    else if ( !strncmp( psz_var, "marq-opacity", 8 ) ) /* "marq-opa" */
+    else if ( !strncmp( psz_var, "marq-opacity", 12 ) )
     {
         p_sys->p_style->i_font_alpha = 255 - newval.i_int;
     }
-    else if ( !strncmp( psz_var, "marq-size", 6 ) )
+    else if ( !strncmp( psz_var, "marq-size", 9 ) )
     {
         p_sys->p_style->i_font_size = newval.i_int;
     }
@@ -379,7 +379,7 @@ static int MarqueeCallback( vlc_object_t *p_this, char const *psz_var,
     {
         p_sys->i_refresh = newval.i_int * 1000;
     }
-    else if ( !strncmp( psz_var, "marq-position", 8 ) )
+    else if ( !strncmp( psz_var, "marq-position", 13 ) )
     /* willing to accept a match against marq-pos */
     {
         p_sys->i_pos = newval.i_int;



More information about the vlc-commits mailing list