[vlc-devel] commit: video_filter_puzzle: remove unnedeed structure ( it does not change anything to the race conditions already present). ( Rémi Duraffort )
git version control
git at videolan.org
Tue Oct 20 19:10:59 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Oct 20 13:05:31 2009 +0200| [a114dc512cec6aa89211f1d107acc58bfca4be26] | committer: Rémi Duraffort
video_filter_puzzle: remove unnedeed structure (it does not change anything to the race conditions already present).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a114dc512cec6aa89211f1d107acc58bfca4be26
---
modules/video_filter/puzzle.c | 25 ++++++-------------------
1 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c
index 2505401..5ad755d 100644
--- a/modules/video_filter/puzzle.c
+++ b/modules/video_filter/puzzle.c
@@ -97,12 +97,6 @@ struct filter_sys_t
/* */
vlc_mutex_t lock;
bool b_change;
- struct
- {
- int i_cols;
- int i_rows;
- bool b_blackslot;
- } change;
};
#define SHUFFLE_WIDTH 81
@@ -151,12 +145,9 @@ static int Open( vlc_object_t *p_this )
p_sys->pi_order = NULL;
vlc_mutex_init( &p_sys->lock );
- p_sys->change.i_rows =
- var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "rows" );
- p_sys->change.i_cols =
- var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "cols" );
- p_sys->change.b_blackslot =
- var_CreateGetBoolCommand( p_filter, CFG_PREFIX "black-slot" );
+ p_sys->i_rows = var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "rows" );
+ p_sys->i_cols = var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "cols" );
+ p_sys->b_blackslot = var_CreateGetBoolCommand( p_filter, CFG_PREFIX "black-slot" );
p_sys->b_change = true;
var_AddCallback( p_filter, CFG_PREFIX "rows", PuzzleCallback, p_sys );
@@ -205,11 +196,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
vlc_mutex_lock( &p_sys->lock );
if( p_sys->b_change )
{
- p_sys->i_rows = p_sys->change.i_rows;
- p_sys->i_cols = p_sys->change.i_cols;
- p_sys->b_blackslot = p_sys->change.b_blackslot;
p_sys->b_change = false;
-
Shuffle( p_sys );
}
vlc_mutex_unlock( &p_sys->lock );
@@ -374,15 +361,15 @@ static int PuzzleCallback( vlc_object_t *p_this, char const *psz_var,
vlc_mutex_lock( &p_sys->lock );
if( !strcmp( psz_var, CFG_PREFIX "rows" ) )
{
- p_sys->change.i_rows = __MAX( 1, newval.i_int );
+ p_sys->i_rows = __MAX( 1, newval.i_int );
}
else if( !strcmp( psz_var, CFG_PREFIX "cols" ) )
{
- p_sys->change.i_cols = __MAX( 1, newval.i_int );
+ p_sys->i_cols = __MAX( 1, newval.i_int );
}
else if( !strcmp( psz_var, CFG_PREFIX "black-slot" ) )
{
- p_sys->change.b_blackslot = newval.b_bool;
+ p_sys->b_blackslot = newval.b_bool;
}
p_sys->b_change = true;
vlc_mutex_unlock( &p_sys->lock );
More information about the vlc-devel
mailing list