[vlc-devel] commit: Logo: thread safety fix ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed May 20 18:53:55 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 19 20:29:10 2009 +0300| [bb6c60093f0c3acca01d57747e2c4458c2061a2f] | committer: Rémi Denis-Courmont
Logo: thread safety fix
There are still bugs. At least posx, posy, pos and b_need_update are not
protected properly, but I don't have time.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb6c60093f0c3acca01d57747e2c4458c2061a2f
---
modules/video_filter/logo.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index ba2152b..bdc988d 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -704,6 +704,9 @@ static int CreateFilter( vlc_object_t *p_this )
p_logo_list->i_repeat =
var_CreateGetIntegerCommand( p_filter, "logo-repeat" );
+ vlc_mutex_init( &p_logo_list->lock );
+ LoadLogoList( p_this, p_logo_list );
+
var_AddCallback( p_filter, "logo-file", LogoCallback, p_sys );
var_AddCallback( p_filter, "logo-x", LogoCallback, p_sys );
var_AddCallback( p_filter, "logo-y", LogoCallback, p_sys );
@@ -711,13 +714,6 @@ static int CreateFilter( vlc_object_t *p_this )
var_AddCallback( p_filter, "logo-transparency", LogoCallback, p_sys );
var_AddCallback( p_filter, "logo-repeat", LogoCallback, p_sys );
- vlc_mutex_init( &p_logo_list->lock );
- vlc_mutex_lock( &p_logo_list->lock );
-
- LoadLogoList( p_this, p_logo_list );
-
- vlc_mutex_unlock( &p_logo_list->lock );
-
/* Misc init */
p_filter->pf_sub_filter = Filter;
p_sys->b_need_update = true;
More information about the vlc-devel
mailing list