[vlc-devel] commit: Add a bunch of FIXMEs ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed May 20 18:53:56 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 19 20:58:47 2009 +0300| [0933fed1eb407dda4ea4162241e41607ec36ab23] | committer: Rémi Denis-Courmont 

Add a bunch of FIXMEs

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

 modules/video_filter/mosaic.c   |   10 ++++------
 modules/video_filter/osdmenu.c  |    3 ++-
 modules/video_filter/postproc.c |    4 +++-
 modules/video_filter/puzzle.c   |    2 ++
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c
index fdc506c..a8d60f0 100644
--- a/modules/video_filter/mosaic.c
+++ b/modules/video_filter/mosaic.c
@@ -322,7 +322,7 @@ static int CreateFilter( vlc_object_t *p_this )
 
     GET_VAR( align, 0, 10 );
     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( borderh, 0, INT_MAX );
@@ -332,7 +332,7 @@ static int CreateFilter( vlc_object_t *p_this )
     GET_VAR( position, 0, 2 );
     GET_VAR( delay, 100, INT_MAX );
 #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,
                                             CFG_PREFIX "keep-aspect-ratio" );
@@ -392,9 +392,8 @@ static void DestroyFilter( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t*)p_this;
     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 )
     {
@@ -403,7 +402,7 @@ static void DestroyFilter( vlc_object_t *p_this )
 
     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] );
         }
@@ -416,7 +415,6 @@ static void DestroyFilter( vlc_object_t *p_this )
         p_sys->i_offsets_length = 0;
     }
 
-    vlc_mutex_unlock( &p_sys->lock );
     vlc_mutex_destroy( &p_sys->lock );
     free( p_sys );
 }
diff --git a/modules/video_filter/osdmenu.c b/modules/video_filter/osdmenu.c
index 8281657..d7f23a4 100644
--- a/modules/video_filter/osdmenu.c
+++ b/modules/video_filter/osdmenu.c
@@ -218,6 +218,7 @@ static int CreateFilter ( vlc_object_t *p_this )
     if( p_sys->p_menu == NULL )
         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;
 
     /* Check if menu position was overridden */
@@ -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 "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",
                          OSDMenuUpdateEvent, p_filter );
diff --git a/modules/video_filter/postproc.c b/modules/video_filter/postproc.c
index 427e973..9d1dc57 100644
--- a/modules/video_filter/postproc.c
+++ b/modules/video_filter/postproc.c
@@ -239,7 +239,7 @@ static int OpenPostproc( vlc_object_t *p_this )
                     &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_sys->b_had_matrix = true;
@@ -254,6 +254,8 @@ static void ClosePostproc( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys = p_filter->p_sys;
+
+    /* FIXME: delete callbacks before mutex */
     vlc_mutex_destroy( &p_sys->lock );
     pp_free_context( p_sys->pp_context );
     if( p_sys->pp_mode ) pp_free_mode( p_sys->pp_mode );
diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c
index f62cb21..3f5e682 100644
--- a/modules/video_filter/puzzle.c
+++ b/modules/video_filter/puzzle.c
@@ -518,6 +518,8 @@ static int PuzzleCallback( vlc_object_t *p_this, char const *psz_var,
 {
     VLC_UNUSED(p_this); VLC_UNUSED(oldval);
     vout_sys_t *p_sys = (vout_sys_t *)p_data;
+
+    /* FIXME: thread safety */
     if( !strcmp( psz_var, CFG_PREFIX "rows" ) )
     {
         p_sys->i_rows = __MAX( 1, newval.i_int );




More information about the vlc-devel mailing list