decodebin2: caps can be NULL

Don't use and unref NULL caps.
This commit is contained in:
Stefan Kost 2011-02-08 12:31:34 +02:00
parent b2389c2108
commit fe59f50468

View file

@ -3064,6 +3064,7 @@ gst_decode_chain_get_topology (GstDecodeChain * chain)
for (; l && l->next; l = l->next) {
GstCaps *caps = _gst_element_get_linked_caps (l->next->data, l->data);
if (caps) {
s = gst_structure_id_empty_new (topology_structure_name);
gst_structure_id_set (u, topology_caps, GST_TYPE_CAPS, caps, NULL);
gst_caps_unref (caps);
@ -3072,6 +3073,7 @@ gst_decode_chain_get_topology (GstDecodeChain * chain)
gst_structure_free (u);
u = s;
}
}
/* Caps that resulted in this chain */
caps = gst_pad_get_negotiated_caps (chain->pad);