[vlc-commits] Fix VLC_CLIP usage (and potential divisions by zero)
Rémi Duraffort
git at videolan.org
Mon Sep 2 17:48:49 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Aug 28 20:15:14 2013 +0200| [61e205fcc31cb63ce239bfa31a57bd976cea6c8a] | committer: Jean-Baptiste Kempf
Fix VLC_CLIP usage (and potential divisions by zero)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit a948f09671f15b9e84c19d14b91f3ee0aa0eee91)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=61e205fcc31cb63ce239bfa31a57bd976cea6c8a
---
modules/video_filter/panoramix.c | 4 ++--
modules/video_filter/wall.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c
index e876942..9de7efa 100644
--- a/modules/video_filter/panoramix.c
+++ b/modules/video_filter/panoramix.c
@@ -501,8 +501,8 @@ static int Open( vlc_object_t *p_this )
p_sys->a_0 = p_sys->bz_begin;
/* */
- p_sys->i_col = VLC_CLIP( COL_MAX, 1, p_sys->i_col );
- p_sys->i_row = VLC_CLIP( ROW_MAX, 1, p_sys->i_row );
+ p_sys->i_col = VLC_CLIP( p_sys->i_col, 1, COL_MAX );
+ p_sys->i_row = VLC_CLIP( p_sys->i_row, 1, ROW_MAX );
msg_Dbg( p_splitter, "opening a %i x %i wall",
p_sys->i_col, p_sys->i_row );
diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c
index 8c965ab..c898a61 100644
--- a/modules/video_filter/wall.c
+++ b/modules/video_filter/wall.c
@@ -132,10 +132,10 @@ static int Open( vlc_object_t *p_this )
/* */
p_sys->i_col = var_CreateGetInteger( p_splitter, CFG_PREFIX "cols" );
- p_sys->i_col = VLC_CLIP( COL_MAX, 1, p_sys->i_col );
+ p_sys->i_col = VLC_CLIP( p_sys->i_col, 1, COL_MAX );
p_sys->i_row = var_CreateGetInteger( p_splitter, CFG_PREFIX "rows" );
- p_sys->i_row = VLC_CLIP( ROW_MAX, 1, p_sys->i_row );
+ p_sys->i_row = VLC_CLIP( p_sys->i_row, 1, ROW_MAX );
msg_Dbg( p_splitter, "opening a %i x %i wall",
p_sys->i_col, p_sys->i_row );
More information about the vlc-commits
mailing list