decodebin2: Don't add non prerolled stream to topology

If a final stream didn't preroll, don't add it to the topology since
it doesn't give any information at all.

https://bugzilla.gnome.org/show_bug.cgi?id=632988
This commit is contained in:
Edward Hervey 2010-09-24 16:02:42 +02:00
parent 9c06f55e19
commit a5752d8ea7

View file

@ -3000,6 +3000,12 @@ gst_decode_chain_get_topology (GstDecodeChain * chain)
GList *l;
GstCaps *caps;
if (G_UNLIKELY ((chain->endpad || chain->deadend)
&& (chain->endcaps == NULL))) {
GST_WARNING ("End chain without valid caps !");
return NULL;
}
u = gst_structure_id_empty_new (topology_structure_name);
/* Now at the last element */
@ -3021,10 +3027,12 @@ gst_decode_chain_get_topology (GstDecodeChain * chain)
g_value_init (&item, GST_TYPE_STRUCTURE);
for (l = chain->active_group->children; l; l = l->next) {
s = gst_decode_chain_get_topology (l->data);
gst_value_set_structure (&item, s);
gst_value_list_append_value (&list, &item);
g_value_reset (&item);
gst_structure_free (s);
if (s) {
gst_value_set_structure (&item, s);
gst_value_list_append_value (&list, &item);
g_value_reset (&item);
gst_structure_free (s);
}
}
gst_structure_id_set_value (u, topology_next, &list);
g_value_unset (&list);