mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
discoverer: early return when we have no streams
This commit is contained in:
parent
2e1b1699fe
commit
9230a6af6a
1 changed files with 4 additions and 5 deletions
|
@ -967,6 +967,10 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
|
||||||
guint i;
|
guint i;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
|
if (!dc->priv->streams) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gst_structure_id_has_field (topology, _TOPOLOGY_PAD_QUARK)) {
|
if (!gst_structure_id_has_field (topology, _TOPOLOGY_PAD_QUARK)) {
|
||||||
GST_DEBUG ("Could not find pad for node %" GST_PTR_FORMAT, topology);
|
GST_DEBUG ("Could not find pad for node %" GST_PTR_FORMAT, topology);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -975,11 +979,6 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
|
||||||
gst_structure_id_get (topology, _TOPOLOGY_PAD_QUARK,
|
gst_structure_id_get (topology, _TOPOLOGY_PAD_QUARK,
|
||||||
GST_TYPE_PAD, &pad, NULL);
|
GST_TYPE_PAD, &pad, NULL);
|
||||||
|
|
||||||
if (!dc->priv->streams) {
|
|
||||||
gst_object_unref (pad);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, tmp = dc->priv->streams; tmp; tmp = tmp->next, i++) {
|
for (i = 0, tmp = dc->priv->streams; tmp; tmp = tmp->next, i++) {
|
||||||
ps = (PrivateStream *) tmp->data;
|
ps = (PrivateStream *) tmp->data;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue