mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
asset: Use static lock
The mutex life cycle follows processs.
This commit is contained in:
parent
e2533a68dc
commit
691b6f6f04
1 changed files with 3 additions and 4 deletions
|
@ -145,7 +145,7 @@ typedef struct
|
|||
} GESAssetCacheEntry;
|
||||
|
||||
/* Also protect all the entries in the cache */
|
||||
static GMutex asset_cache_lock;
|
||||
G_LOCK_DEFINE_STATIC (asset_cache_lock);
|
||||
/* We are mapping entries by types and ID, such as:
|
||||
*
|
||||
* {
|
||||
|
@ -169,8 +169,8 @@ static GMutex asset_cache_lock;
|
|||
* different extractable types.
|
||||
**/
|
||||
static GHashTable *type_entries_table = NULL;
|
||||
#define LOCK_CACHE (g_mutex_lock (&asset_cache_lock))
|
||||
#define UNLOCK_CACHE (g_mutex_unlock (&asset_cache_lock))
|
||||
#define LOCK_CACHE (G_LOCK (asset_cache_lock))
|
||||
#define UNLOCK_CACHE (G_UNLOCK (asset_cache_lock))
|
||||
|
||||
static gchar *
|
||||
_check_and_update_parameters (GType * extractable_type, const gchar * id,
|
||||
|
@ -631,7 +631,6 @@ ges_asset_cache_put (GESAsset * asset, GTask * task)
|
|||
void
|
||||
ges_asset_cache_init (void)
|
||||
{
|
||||
g_mutex_init (&asset_cache_lock);
|
||||
type_entries_table = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
NULL, (GDestroyNotify) g_hash_table_unref);
|
||||
|
||||
|
|
Loading…
Reference in a new issue