[vlc-commits] visual: spect-sections should be strictly positive

Rémi Duraffort git at videolan.org
Fri Aug 9 10:28:58 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Aug  8 19:09:31 2013 +0200| [f1e2fc17e7ae0049583d875d3da314d6c7ae2650] | committer: Jean-Baptiste Kempf

visual: spect-sections should be strictly positive

(cherry picked from commit bb2e749435588e206266c608e5e0ecc855f255a7)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/visualization/visual/visual.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/visualization/visual/visual.c b/modules/visualization/visual/visual.c
index 85bd981..e0d2244 100644
--- a/modules/visualization/visual/visual.c
+++ b/modules/visualization/visual/visual.c
@@ -29,6 +29,7 @@
 #endif
 
 #include <assert.h>
+#include <limits.h>
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
@@ -129,7 +130,7 @@ vlc_module_begin ()
              BASE_TEXT, BASE_TEXT, true )
     add_integer("spect-radius", 42,
              RADIUS_TEXT, RADIUS_LONGTEXT, true )
-    add_integer("spect-sections", 3,
+    add_integer_with_range("spect-sections", 3, 1, INT_MAX,
              SSECT_TEXT, SSECT_LONGTEXT, true )
     add_integer("spect-color", 80,
              COLOR1_TEXT, COLOR1_LONGTEXT, true )



More information about the vlc-commits mailing list