bin: Don't interprete pipelines without sink elements as always being in EOS state

Some tests (e.g. elements/capsfilter) have pipelines with dangling
sinkpads and without a sink element. These pipelines can never post
an EOS message (because this is only valid by a sink) and as such
should never get an EOS message posted by the bin.
This commit is contained in:
Sebastian Dröge 2011-05-12 16:48:41 +02:00
parent cdffc1d5d5
commit 7316a88387

View file

@ -996,6 +996,7 @@ static gboolean
is_eos (GstBin * bin, guint32 * seqnum)
{
gboolean result;
gint n_eos = 0;
GList *walk, *msgs;
result = TRUE;
@ -1009,6 +1010,7 @@ is_eos (GstBin * bin, guint32 * seqnum)
find_message (bin, GST_OBJECT_CAST (element), GST_MESSAGE_EOS))) {
GST_DEBUG ("sink '%s' posted EOS", GST_ELEMENT_NAME (element));
*seqnum = gst_message_get_seqnum (GST_MESSAGE_CAST (msgs->data));
n_eos++;
} else {
GST_DEBUG ("sink '%s' did not post EOS yet",
GST_ELEMENT_NAME (element));
@ -1017,7 +1019,13 @@ is_eos (GstBin * bin, guint32 * seqnum)
}
}
}
return result;
/* FIXME: Some tests (e.g. elements/capsfilter) use
* pipelines with a dangling sinkpad but no sink element.
* These tests assume that no EOS message is ever
* posted on the bus so let's keep that behaviour.
* In valid pipelines this doesn't make a difference.
*/
return result && n_eos > 0;
}
static void