mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
discoverer: fix potential caps leak
in last else chunk.
This commit is contained in:
parent
35df9d2ad9
commit
b794f78d26
1 changed files with 2 additions and 5 deletions
|
@ -908,24 +908,21 @@ parse_stream_topology (GstDiscoverer * dc, const GstStructure * topology,
|
||||||
/* We sometimes get an extra sub-stream from the parser. If this is
|
/* We sometimes get an extra sub-stream from the parser. If this is
|
||||||
* the case, we just replace the parent caps with this stream's caps
|
* the case, we just replace the parent caps with this stream's caps
|
||||||
* since they might contain more information */
|
* since they might contain more information */
|
||||||
gst_caps_unref (parent->caps);
|
gst_caps_replace (&parent->caps, caps);
|
||||||
parent->caps = caps;
|
|
||||||
|
|
||||||
parse_stream_topology (dc, st, parent);
|
parse_stream_topology (dc, st, parent);
|
||||||
add_to_list = FALSE;
|
add_to_list = FALSE;
|
||||||
|
|
||||||
} else if (child_is_raw_stream (parent->caps, caps)) {
|
} else if (child_is_raw_stream (parent->caps, caps)) {
|
||||||
/* This is the "raw" stream corresponding to the parent. This
|
/* This is the "raw" stream corresponding to the parent. This
|
||||||
* contains more information than the parent, tags etc. */
|
* contains more information than the parent, tags etc. */
|
||||||
parse_stream_topology (dc, st, parent);
|
parse_stream_topology (dc, st, parent);
|
||||||
add_to_list = FALSE;
|
add_to_list = FALSE;
|
||||||
gst_caps_unref (caps);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
GstDiscovererStreamInfo *next = parse_stream_topology (dc, st, NULL);
|
GstDiscovererStreamInfo *next = parse_stream_topology (dc, st, NULL);
|
||||||
res->next = next;
|
res->next = next;
|
||||||
next->previous = res;
|
next->previous = res;
|
||||||
}
|
}
|
||||||
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue