[vlc-devel] commit: str_format_meta: take the input stats lock as needed ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 28 18:47:10 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 28 19:37:07 2009 +0200| [7913df2296a3d2b97abce87cd916c8572b16084a] | committer: Rémi Denis-Courmont 

str_format_meta: take the input stats lock as needed

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

 src/text/strings.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/text/strings.c b/src/text/strings.c
index b76d14c..ee0085e 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -742,8 +742,10 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
                 case 'f':
                     if( p_item && p_item->p_stats )
                     {
+                        vlc_mutex_lock( &p_item->p_stats->lock );
                         snprintf( buf, 10, "%d",
                                   p_item->p_stats->i_displayed_pictures );
+                        vlc_mutex_unlock( &p_item->p_stats->lock );
                     }
                     else
                     {




More information about the vlc-devel mailing list