From 0faec707a049f63a9195213f9427004615006705 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 26 Jul 2024 16:38:31 +1000 Subject: [PATCH] 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: --- .../ext/adaptivedemux2/gstadaptivedemux-stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c index 2556bab869..fcf2dcfcf1 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c @@ -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);