adaptivedemux: Fail cleanly if parsebin is not installed

Detect a failure to construct a parsebin and error out
cleanly instead of trying to operate on a null pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
This commit is contained in:
Jan Schmidt 2024-07-26 16:38:31 +10:00 committed by GStreamer Marge Bot
parent 213726ca41
commit 0faec707a0

View file

@ -1154,6 +1154,9 @@ gst_adaptive_demux2_stream_create_parser (GstAdaptiveDemux2Stream * stream)
}
stream->parsebin = gst_element_factory_make ("parsebin", NULL);
if (stream->parsebin == NULL) {
return FALSE;
}
if (tsdemux_type)
g_signal_connect (stream->parsebin, "deep-element-added",
(GCallback) parsebin_deep_element_added_cb, demux);