diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2019-12-19 15:19:29 -0500 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2019-12-19 22:35:18 +0000 |
commit | 416728f21393b98acd4a13082a20de24c6a1fec0 (patch) | |
tree | 9bc847ff770c39ecc3ed64ef0500cac1a1bed6c1 /gst/autoconvert | |
parent | c7fe1e81648e3b709ae657ca0a6a80ee8df1aa11 (diff) | |
download | gstreamer-plugins-bad-416728f21393b98acd4a13082a20de24c6a1fec0.tar.gz |
autoconvert: Fix lock-less exchange or free condition
Before this change, we would free the list we just have saved.
Fixes #1158
Diffstat (limited to 'gst/autoconvert')
-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 46bec1314..7bf7cac3c 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); } |