[vlc-devel] commit: Fixed locking scheme. (Laurent Aimar )

git version control git at videolan.org
Sun Jul 20 22:51:09 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jul 20 22:53:23 2008 +0200| [fb0a060578bd8c7b2983e2b8ed0dffda8a51c631]

Fixed locking scheme.

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

 modules/misc/freetype.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 674fe76..7ca5662 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -486,7 +486,6 @@ static vlc_object_t *FontBuilderAttach( filter_t *p_filter, vlc_mutex_t **pp_loc
         var_TriggerCallback( p_fontbuilder, "build-done" );
     }
     vlc_mutex_unlock( p_lock );
-
     *pp_lock = p_lock;
     return p_fontbuilder;
 }
@@ -2205,10 +2204,12 @@ static int BuildDone( vlc_object_t *p_this, const char *psz_var,
 
     if( newval.b_bool )
     {
-        vlc_mutex_lock( p_sys->p_fontconfig_lock );
+        vlc_mutex_t *p_lock = var_AcquireMutex( "fontbuilder" );
+
         p_sys->b_fontconfig_ok = true;
         p_sys->p_fontconfig = p_this->p_private;
-        vlc_mutex_unlock( p_sys->p_fontconfig_lock );
+
+        vlc_mutex_unlock( p_lock );
     }
 
     VLC_UNUSED(psz_var);




More information about the vlc-devel mailing list