parsebin: Avoid crash with unknown streams

With the new addition of handling unknown sream types we *could* end up with a
chain which doesn't have a current_pad (it's an intermediary one)

Fixes #1287

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2827>
This commit is contained in:
Edward Hervey 2022-08-01 17:25:56 +02:00 committed by Tim-Philipp Müller
parent 43b15a5b01
commit 80a8702de2

View file

@ -3725,6 +3725,9 @@ gst_parse_chain_expose (GstParseChain * chain, GList ** endpads,
if (!group) {
GstParsePad *p = chain->current_pad;
if (!p)
return FALSE;
if (p->active_stream && p->active_collection == NULL
&& !p->in_a_fallback_collection)
*uncollected_streams = TRUE;