diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2019-12-19 15:19:29 -0500 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-01-01 15:10:52 +0000 |
commit | 881246497fd257802ac923888e435ba35501cc4d (patch) | |
tree | eb93bb67b6282bdcdedd97480fba2903c3e80c26 | |
parent | 6ff7988109ad3cc48e23da7c9156eadc3e15ebb4 (diff) | |
download | gstreamer-plugins-bad-881246497fd257802ac923888e435ba35501cc4d.tar.gz |
autoconvert: Fix lock-less exchange or free condition
Before this change, we would free the list we just have saved.
Fixes #1158
-rw-r--r-- | gst/autoconvert/gstautoconvert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c index 5d3d565af..c3db17740 100644 --- a/gst/autoconvert/gstautoconvert.c +++ b/gst/autoconvert/gstautoconvert.c @@ -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); } |