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:
Nicolas Dufresne 2019-12-19 15:19:29 -05:00 committed by GStreamer Merge Bot
parent c7fe1e8164
commit 416728f213

View file

@ -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);
}