From cfb22080e28236802018868e4f40d46b57560c39 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 28 Jul 2009 21:15:52 +0200 Subject: [PATCH] collectpads: Get the flushing state with the object lock taken. Fixes #590056 --- libs/gst/base/gstcollectpads.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c index e92df62..197671d 100644 --- a/libs/gst/base/gstcollectpads.c +++ b/libs/gst/base/gstcollectpads.c @@ -1159,12 +1159,15 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event) pads->eospads--; data->abidata.ABI.eos = FALSE; } - GST_OBJECT_UNLOCK (pads); - if (!gst_collect_pads_is_flushing (pads)) + if (!gst_collect_pads_is_flushing (pads)) { /* forward event if all pads are no longer flushing */ + GST_DEBUG ("No more pads are flushing, forwarding FLUSH_STOP"); + GST_OBJECT_UNLOCK (pads); goto forward; + } gst_event_unref (event); + GST_OBJECT_UNLOCK (pads); goto done; } case GST_EVENT_EOS: -- 2.7.4