[vlc-commits] audiobargraph_v: messages do not contain a '@' anymore

Rafaël Carré git at videolan.org
Wed Jul 27 16:24:49 CEST 2016


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Jul 27 15:55:30 2016 +0200| [2b461b2630d7f918fc676b1b4a766f039e8f8e26] | committer: Rafaël Carré

audiobargraph_v: messages do not contain a '@' anymore

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

 modules/video_filter/audiobargraph_v.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/modules/video_filter/audiobargraph_v.c b/modules/video_filter/audiobargraph_v.c
index 71814e4..d8b1477 100644
--- a/modules/video_filter/audiobargraph_v.c
+++ b/modules/video_filter/audiobargraph_v.c
@@ -324,7 +324,6 @@ static int BarGraphCallback(vlc_object_t *p_this, char const *psz_var,
     VLC_UNUSED(p_this); VLC_UNUSED(oldval);
     filter_sys_t *p_sys = p_data;
     BarGraph_t *p_BarGraph = &p_sys->p_BarGraph;
-    char* res = NULL;
 
     vlc_mutex_lock(&p_sys->lock);
     if (!strcmp(psz_var, CFG_PREFIX "x"))
@@ -336,13 +335,8 @@ static int BarGraphCallback(vlc_object_t *p_this, char const *psz_var,
     else if (!strcmp(psz_var, CFG_PREFIX "transparency"))
         p_BarGraph->i_alpha = VLC_CLIP(newval.i_int, 0, 255);
     else if (!strcmp(psz_var, CFG_PREFIX "i_values")) {
-        char *psz = xstrdup(newval.psz_string ? newval.psz_string : "");
-        // in case many answer are received at the same time, only keep one
-        res = strchr(psz, '@');
-        if (res)
-            *res = '\0';
-        parse_i_values(p_BarGraph, psz);
-        free(psz);
+        if (newval.psz_string)
+            parse_i_values(p_BarGraph, newval.psz_string);
         Draw(p_BarGraph);
     } else if (!strcmp(psz_var, CFG_PREFIX "alarm")) {
         p_BarGraph->alarm = newval.b_bool;



More information about the vlc-commits mailing list