summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-09-24 10:42:06 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-09-24 10:44:34 +0200
commit20f1c96c89e9b5d57a83f81eee4191938c952764 (patch)
treeffbace42726c0da4cadb43e0caa9d568ebba371f
parentc79e5bbcad3f73fd231d4571d95506fd516f7a98 (diff)
collectpads: Make sure that the object lock is always taken when accessing the private pad list
https://bugzilla.gnome.org/show_bug.cgi?id=708636
-rw-r--r--libs/gst/base/gstcollectpads.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c
index c61b47209..3d69abdba 100644
--- a/libs/gst/base/gstcollectpads.c
+++ b/libs/gst/base/gstcollectpads.c
@@ -726,7 +726,7 @@ unknown_pad:
}
/*
- * Must be called with STREAM_LOCK.
+ * Must be called with STREAM_LOCK and OBJECT_LOCK.
*/
static void
gst_collect_pads_set_flushing_unlocked (GstCollectPads * pads,
@@ -778,7 +778,9 @@ gst_collect_pads_set_flushing (GstCollectPads * pads, gboolean flushing)
/* NOTE since this eventually calls _pop, some (STREAM_)LOCK is needed here */
GST_COLLECT_PADS_STREAM_LOCK (pads);
+ GST_OBJECT_LOCK (pads);
gst_collect_pads_set_flushing_unlocked (pads, flushing);
+ GST_OBJECT_UNLOCK (pads);
GST_COLLECT_PADS_STREAM_UNLOCK (pads);
}