[vlc-commits] commit: avcodec: use vlc_global_mutex ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu Jun 3 22:55:52 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun  3 23:29:24 2010 +0300| [2a5fa328ccb31a60ddd85e10c77c858594fe6838] | committer: Rémi Denis-Courmont 

avcodec: use vlc_global_mutex

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

 include/vlc_avcodec.h |    8 +++-----
 src/libvlc.c          |   12 ------------
 src/libvlccore.sym    |    1 -
 3 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/include/vlc_avcodec.h b/include/vlc_avcodec.h
index fc5a3a9..fd3d2e6 100644
--- a/include/vlc_avcodec.h
+++ b/include/vlc_avcodec.h
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * vlc_avcodec.h: VLC thread support for FFMPEG/libavcodec
  *****************************************************************************
- * Copyright (C) 2009 Rémi Denis-Courmont
+ * Copyright (C) 2009-2010 Rémi Denis-Courmont
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,16 +21,14 @@
 #ifndef VLC_AVCODEC_H
 # define VLC_AVCODEC_H 1
 
-VLC_EXPORT( void, vlc_avcodec_mutex, (bool) );
-
 static inline void vlc_avcodec_lock (void)
 {
-    vlc_avcodec_mutex (true);
+    vlc_global_lock (VLC_AVCODEC_MUTEX);
 }
 
 static inline void vlc_avcodec_unlock (void)
 {
-    vlc_avcodec_mutex (false);
+    vlc_global_unlock (VLC_AVCODEC_MUTEX);
 }
 
 #endif
diff --git a/src/libvlc.c b/src/libvlc.c
index 9affe8c..efd4952 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1967,15 +1967,3 @@ static int ConsoleWidth( void )
 
     return i_width;
 }
-
-#include <vlc_avcodec.h>
-
-void vlc_avcodec_mutex (bool acquire)
-{
-    static vlc_mutex_t lock = VLC_STATIC_MUTEX;
-
-    if (acquire)
-        vlc_mutex_lock (&lock);
-    else
-        vlc_mutex_unlock (&lock);
-}
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index bb3ad12..2ea18f9 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -473,7 +473,6 @@ video_format_Setup
 video_format_Print
 video_splitter_Delete
 video_splitter_New
-vlc_avcodec_mutex
 vlc_b64_decode
 vlc_b64_decode_binary
 vlc_b64_decode_binary_to_buffer



More information about the vlc-commits mailing list