Commit 0933fed1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Add a bunch of FIXMEs

parent 5e2bfc33
...@@ -322,7 +322,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -322,7 +322,7 @@ static int CreateFilter( vlc_object_t *p_this )
GET_VAR( align, 0, 10 ); GET_VAR( align, 0, 10 );
if( p_sys->i_align == 3 || p_sys->i_align == 7 ) if( p_sys->i_align == 3 || p_sys->i_align == 7 )
p_sys->i_align = 5; p_sys->i_align = 5; /* FIXME: NOT THREAD SAFE w.r.t. callback */
GET_VAR( borderw, 0, INT_MAX ); GET_VAR( borderw, 0, INT_MAX );
GET_VAR( borderh, 0, INT_MAX ); GET_VAR( borderh, 0, INT_MAX );
...@@ -332,7 +332,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -332,7 +332,7 @@ static int CreateFilter( vlc_object_t *p_this )
GET_VAR( position, 0, 2 ); GET_VAR( position, 0, 2 );
GET_VAR( delay, 100, INT_MAX ); GET_VAR( delay, 100, INT_MAX );
#undef GET_VAR #undef GET_VAR
p_sys->i_delay *= 1000; p_sys->i_delay *= 1000; /* FIXME: NOT THREAD SAFE w.r.t. callback */
p_sys->b_ar = var_CreateGetBoolCommand( p_filter, p_sys->b_ar = var_CreateGetBoolCommand( p_filter,
CFG_PREFIX "keep-aspect-ratio" ); CFG_PREFIX "keep-aspect-ratio" );
...@@ -392,9 +392,8 @@ static void DestroyFilter( vlc_object_t *p_this ) ...@@ -392,9 +392,8 @@ static void DestroyFilter( vlc_object_t *p_this )
{ {
filter_t *p_filter = (filter_t*)p_this; filter_t *p_filter = (filter_t*)p_this;
filter_sys_t *p_sys = p_filter->p_sys; filter_sys_t *p_sys = p_filter->p_sys;
int i_index;
vlc_mutex_lock( &p_sys->lock ); /* FIXME: destroy callbacks first! */
if( !p_sys->b_keep ) if( !p_sys->b_keep )
{ {
...@@ -403,7 +402,7 @@ static void DestroyFilter( vlc_object_t *p_this ) ...@@ -403,7 +402,7 @@ static void DestroyFilter( vlc_object_t *p_this )
if( p_sys->i_order_length ) if( p_sys->i_order_length )
{ {
for( i_index = 0; i_index < p_sys->i_order_length; i_index++ ) for( int i_index = 0; i_index < p_sys->i_order_length; i_index++ )
{ {
free( p_sys->ppsz_order[i_index] ); free( p_sys->ppsz_order[i_index] );
} }
...@@ -416,7 +415,6 @@ static void DestroyFilter( vlc_object_t *p_this ) ...@@ -416,7 +415,6 @@ static void DestroyFilter( vlc_object_t *p_this )
p_sys->i_offsets_length = 0; p_sys->i_offsets_length = 0;
} }
vlc_mutex_unlock( &p_sys->lock );
vlc_mutex_destroy( &p_sys->lock ); vlc_mutex_destroy( &p_sys->lock );
free( p_sys ); free( p_sys );
} }
......
...@@ -218,6 +218,7 @@ static int CreateFilter ( vlc_object_t *p_this ) ...@@ -218,6 +218,7 @@ static int CreateFilter ( vlc_object_t *p_this )
if( p_sys->p_menu == NULL ) if( p_sys->p_menu == NULL )
goto error; goto error;
/* FIXME: this plugin is not at all thread-safe w.r.t. callbacks */
p_sys->p_menu->i_position = p_sys->i_position; p_sys->p_menu->i_position = p_sys->i_position;
/* Check if menu position was overridden */ /* Check if menu position was overridden */
...@@ -289,7 +290,7 @@ static void DestroyFilter( vlc_object_t *p_this ) ...@@ -289,7 +290,7 @@ static void DestroyFilter( vlc_object_t *p_this )
var_DelCallback( p_filter, OSD_CFG "update", OSDMenuCallback, p_sys ); var_DelCallback( p_filter, OSD_CFG "update", OSDMenuCallback, p_sys );
var_DelCallback( p_filter, OSD_CFG "alpha", OSDMenuCallback, p_sys ); var_DelCallback( p_filter, OSD_CFG "alpha", OSDMenuCallback, p_sys );
if( p_sys ) if( p_sys ) /* FIXME: <-- WTF??? what about the 4 ones above? */
{ {
var_DelCallback( p_sys->p_menu, "osd-menu-update", var_DelCallback( p_sys->p_menu, "osd-menu-update",
OSDMenuUpdateEvent, p_filter ); OSDMenuUpdateEvent, p_filter );
......
...@@ -239,7 +239,7 @@ static int OpenPostproc( vlc_object_t *p_this ) ...@@ -239,7 +239,7 @@ static int OpenPostproc( vlc_object_t *p_this )
&val, text.psz_string?&text:NULL ); &val, text.psz_string?&text:NULL );
} }
vlc_mutex_init( &p_sys->lock ); vlc_mutex_init( &p_sys->lock ); /* FIXME: too late w.r.t. callback */
p_filter->pf_video_filter = PostprocPict; p_filter->pf_video_filter = PostprocPict;
p_sys->b_had_matrix = true; p_sys->b_had_matrix = true;
...@@ -254,6 +254,8 @@ static void ClosePostproc( vlc_object_t *p_this ) ...@@ -254,6 +254,8 @@ static void ClosePostproc( vlc_object_t *p_this )
{ {
filter_t *p_filter = (filter_t *)p_this; filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys = p_filter->p_sys; filter_sys_t *p_sys = p_filter->p_sys;
/* FIXME: delete callbacks before mutex */
vlc_mutex_destroy( &p_sys->lock ); vlc_mutex_destroy( &p_sys->lock );
pp_free_context( p_sys->pp_context ); pp_free_context( p_sys->pp_context );
if( p_sys->pp_mode ) pp_free_mode( p_sys->pp_mode ); if( p_sys->pp_mode ) pp_free_mode( p_sys->pp_mode );
......
...@@ -518,6 +518,8 @@ static int PuzzleCallback( vlc_object_t *p_this, char const *psz_var, ...@@ -518,6 +518,8 @@ static int PuzzleCallback( vlc_object_t *p_this, char const *psz_var,
{ {
VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(p_this); VLC_UNUSED(oldval);
vout_sys_t *p_sys = (vout_sys_t *)p_data; vout_sys_t *p_sys = (vout_sys_t *)p_data;
/* FIXME: thread safety */
if( !strcmp( psz_var, CFG_PREFIX "rows" ) ) if( !strcmp( psz_var, CFG_PREFIX "rows" ) )
{ {
p_sys->i_rows = __MAX( 1, newval.i_int ); p_sys->i_rows = __MAX( 1, newval.i_int );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment