mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
29 lines
967 B
Diff
29 lines
967 B
Diff
From 40ab4538575dffc7791c7d289d60d30153723307 Mon Sep 17 00:00:00 2001
|
|
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
Date: Thu, 19 Dec 2019 15:19:29 -0500
|
|
Subject: [PATCH] autoconvert: Fix lock-less exchange or free condition
|
|
|
|
Before this change, we would free the list we just have saved.
|
|
|
|
Fixes #1158
|
|
---
|
|
gst/autoconvert/gstautoconvert.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
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);
|
|
}
|
|
--
|
|
2.22.2
|
|
|