From 2a5fa328ccb31a60ddd85e10c77c858594fe6838 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 3 Jun 2010 23:29:24 +0300 Subject: [PATCH] avcodec: use vlc_global_mutex --- 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 fc5a3a99bd..fd3d2e6b25 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 9affe8cf37..efd4952445 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1967,15 +1967,3 @@ static int ConsoleWidth( void ) return i_width; } - -#include - -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 bb3ad12710..2ea18f9395 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 -- 2.39.2