summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-06-24 11:11:35 +0200
committerEdward Hervey <bilboed@bilboed.com>2009-07-04 17:17:18 +0200
commited18ceffe66715975fec608bfc702f1703df4a1c (patch)
tree0e15a4e064fabdc6a2353a99b6fe519ac9e9ee70 /libs
parent4d76b175efa903b58843672fb2d055eacc80d3a0 (diff)
collectpads: Update the cookie when setting ourselves as flushing.
This forces the pad status to be re-evaluated on the next _check_pads().
Diffstat (limited to 'libs')
-rw-r--r--libs/gst/base/gstcollectpads.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c
index 97fa9b381..c8b7aaf8c 100644
--- a/libs/gst/base/gstcollectpads.c
+++ b/libs/gst/base/gstcollectpads.c
@@ -517,6 +517,8 @@ gst_collect_pads_set_flushing_unlocked (GstCollectPads * pads,
{
GSList *walk = NULL;
+ GST_DEBUG ("Setting flushing (%d)", flushing);
+
/* Update the pads flushing flag */
for (walk = pads->data; walk; walk = g_slist_next (walk)) {
GstCollectData *cdata = walk->data;
@@ -532,6 +534,10 @@ gst_collect_pads_set_flushing_unlocked (GstCollectPads * pads,
GST_OBJECT_UNLOCK (cdata->pad);
}
}
+ /* Setting the pads to flushing means that we changed the values which
+ * are 'protected' by the cookie. We therefore update it to force a
+ * recalculation of the current pad status. */
+ pads->abidata.ABI.pad_cookie++;
}
/**
@@ -969,6 +975,8 @@ gst_collect_pads_check_pads (GstCollectPads * pads)
{
/* the master list and cookie are protected with the PAD_LOCK */
GST_COLLECT_PADS_PAD_LOCK (pads);
+ GST_DEBUG ("stored cookie : %d, used_cookie:%d",
+ pads->abidata.ABI.pad_cookie, pads->cookie);
if (G_UNLIKELY (pads->abidata.ABI.pad_cookie != pads->cookie)) {
GSList *collected;