autoconvert: Fix lock-less exchange or free condition
Before this change, we would free the list we just have saved. Fixes #1158
This commit is contained in:
parent
c7fe1e8164
commit
416728f213
@ -895,7 +895,7 @@ gst_auto_convert_load_factories (GstAutoConvert * autoconvert)
|
||||
|
||||
g_assert (all_factories);
|
||||
|
||||
if (g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL,
|
||||
if (!g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL,
|
||||
all_factories)) {
|
||||
gst_plugin_feature_list_free (all_factories);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user