summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu.duponchelle@epitech.eu>2013-09-17 23:23:34 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-09-24 10:44:34 +0200
commitc79e5bbcad3f73fd231d4571d95506fd516f7a98 (patch)
tree343c2688092c3ab0ca6006601f6492a99371d2b9
parentcba26c9ed901e9cce4812519db5f04ac0d198f5d (diff)
collectpads: Use private pad list in set_flushing_unlocked
pads->data is the public list. It is dynamically rebuilt at each call to check_collected, in check_pads to be specific. When you add a pad and collectpads have been started, it is not added to the public list. Thus there exists a possible race where : 1) You would add a pad to collectpads while running. 2) You set collectpads to flushing before check_collected has been called again -> the pad is not set to flushing 3) the pad starts pushing data as downstream might not be prepared, in the case of adder it then returns FLOW_FLUSHING. 4) elements like demuxers, when they get a FLOW_FLUSHING, stop their tasks, never to be seen again. https://bugzilla.gnome.org/show_bug.cgi?id=708636
-rw-r--r--libs/gst/base/gstcollectpads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c
index d24e03b48..c61b47209 100644
--- a/libs/gst/base/gstcollectpads.c
+++ b/libs/gst/base/gstcollectpads.c
@@ -735,7 +735,7 @@ gst_collect_pads_set_flushing_unlocked (GstCollectPads * pads,
GSList *walk = NULL;
/* Update the pads flushing flag */
- for (walk = pads->data; walk; walk = g_slist_next (walk)) {
+ for (walk = pads->priv->pad_list; walk; walk = g_slist_next (walk)) {
GstCollectData *cdata = walk->data;
if (GST_IS_PAD (cdata->pad)) {