mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
assets: Avoid deadlock when done initialising asset
Avoid to hold the CACHE lock when setting the GTasks return values. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=752300
This commit is contained in:
parent
50f26f1269
commit
724418b75d
1 changed files with 6 additions and 4 deletions
|
@ -474,7 +474,6 @@ ges_asset_cache_set_loaded (GType extractable_type, const gchar * id,
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
GESAsset *asset;
|
GESAsset *asset;
|
||||||
GESAssetCacheEntry *entry = NULL;
|
GESAssetCacheEntry *entry = NULL;
|
||||||
|
|
||||||
LOCK_CACHE;
|
LOCK_CACHE;
|
||||||
if ((entry = _lookup_entry (extractable_type, id)) == NULL) {
|
if ((entry = _lookup_entry (extractable_type, id)) == NULL) {
|
||||||
UNLOCK_CACHE;
|
UNLOCK_CACHE;
|
||||||
|
@ -509,12 +508,15 @@ ges_asset_cache_set_loaded (GType extractable_type, const gchar * id,
|
||||||
g_list_free (results);
|
g_list_free (results);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
asset->priv->state = ASSET_INITIALIZED;
|
GList *results;
|
||||||
|
|
||||||
g_list_foreach (entry->results, (GFunc) _gtask_return_true, NULL);
|
asset->priv->state = ASSET_INITIALIZED;
|
||||||
g_list_free_full (entry->results, gst_object_unref);
|
results = entry->results;
|
||||||
entry->results = NULL;
|
entry->results = NULL;
|
||||||
UNLOCK_CACHE;
|
UNLOCK_CACHE;
|
||||||
|
|
||||||
|
g_list_foreach (results, (GFunc) _gtask_return_true, NULL);
|
||||||
|
g_list_free_full (results, gst_object_unref);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue