mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
discoverer: Check return values
The target pad of a ghostpad could have gone (due to shutdown taking place for example). Check for it's existence before doing anything with it.
This commit is contained in:
parent
f448cecceb
commit
7e28f6c076
1 changed files with 2 additions and 0 deletions
|
@ -1076,6 +1076,8 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
|
||||||
ps = (PrivateStream *) tmp->data;
|
ps = (PrivateStream *) tmp->data;
|
||||||
|
|
||||||
target_pad = gst_ghost_pad_get_target (GST_GHOST_PAD (ps->pad));
|
target_pad = gst_ghost_pad_get_target (GST_GHOST_PAD (ps->pad));
|
||||||
|
if (target_pad == NULL)
|
||||||
|
continue;
|
||||||
gst_object_unref (target_pad);
|
gst_object_unref (target_pad);
|
||||||
|
|
||||||
if (target_pad == pad)
|
if (target_pad == pad)
|
||||||
|
|
Loading…
Reference in a new issue