Revert "aggregator: Start the task when linked"

This reverts commit 302580c381.
This commit is contained in:
Nicolas Dufresne 2016-05-25 13:38:47 -04:00 committed by Tim-Philipp Müller
parent 3b05c55222
commit 885c95c3ed

View file

@ -922,11 +922,9 @@ gst_aggregator_start_srcpad_task (GstAggregator * self)
{
GST_INFO_OBJECT (self, "Starting srcpad task");
if (gst_pad_is_active (self->srcpad)) {
self->priv->running = TRUE;
gst_pad_start_task (GST_PAD (self->srcpad),
(GstTaskFunction) gst_aggregator_aggregate_func, self, NULL);
}
self->priv->running = TRUE;
gst_pad_start_task (GST_PAD (self->srcpad),
(GstTaskFunction) gst_aggregator_aggregate_func, self, NULL);
}
static GstFlowReturn
@ -1139,7 +1137,6 @@ gst_aggregator_default_sink_event (GstAggregator * self,
}
case GST_EVENT_STREAM_START:
{
gst_aggregator_start_srcpad_task (self);
goto eat;
}
case GST_EVENT_GAP:
@ -1366,6 +1363,7 @@ gst_aggregator_request_new_pad (GstElement * element,
GstAggregator *self;
GstAggregatorPad *agg_pad;
GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (element);
GstAggregatorPrivate *priv = GST_AGGREGATOR (element)->priv;
self = GST_AGGREGATOR (element);
@ -1378,7 +1376,7 @@ gst_aggregator_request_new_pad (GstElement * element,
GST_DEBUG_OBJECT (element, "Adding pad %s", GST_PAD_NAME (agg_pad));
self->priv->has_peer_latency = FALSE;
if (gst_pad_is_active (self->srcpad))
if (priv->running)
gst_pad_set_active (GST_PAD (agg_pad), TRUE);
/* add the pad to the element */
@ -1787,6 +1785,7 @@ gst_aggregator_src_pad_activate_mode_func (GstPad * pad,
case GST_PAD_MODE_PUSH:
{
GST_INFO_OBJECT (pad, "Activating pad!");
gst_aggregator_start_srcpad_task (self);
return TRUE;
}
default: