mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
decodebin2: caps can be NULL
Don't use and unref NULL caps.
This commit is contained in:
parent
b2389c2108
commit
fe59f50468
1 changed files with 8 additions and 6 deletions
|
@ -3064,13 +3064,15 @@ gst_decode_chain_get_topology (GstDecodeChain * chain)
|
||||||
for (; l && l->next; l = l->next) {
|
for (; l && l->next; l = l->next) {
|
||||||
GstCaps *caps = _gst_element_get_linked_caps (l->next->data, l->data);
|
GstCaps *caps = _gst_element_get_linked_caps (l->next->data, l->data);
|
||||||
|
|
||||||
s = gst_structure_id_empty_new (topology_structure_name);
|
if (caps) {
|
||||||
gst_structure_id_set (u, topology_caps, GST_TYPE_CAPS, caps, NULL);
|
s = gst_structure_id_empty_new (topology_structure_name);
|
||||||
gst_caps_unref (caps);
|
gst_structure_id_set (u, topology_caps, GST_TYPE_CAPS, caps, NULL);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
gst_structure_id_set (s, topology_next, GST_TYPE_STRUCTURE, u, NULL);
|
gst_structure_id_set (s, topology_next, GST_TYPE_STRUCTURE, u, NULL);
|
||||||
gst_structure_free (u);
|
gst_structure_free (u);
|
||||||
u = s;
|
u = s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Caps that resulted in this chain */
|
/* Caps that resulted in this chain */
|
||||||
|
|
Loading…
Reference in a new issue