From bd8f0280e22ffddec8cf73ca07eadfbf5739b1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 9 Feb 2023 11:38:31 +0100 Subject: [PATCH] plugin: Check importer presence before proposing allocation In some cases importer might not be determined here yet. Check if we have it to avoid a crash. --- lib/gst/plugin/gstclappersink.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/gst/plugin/gstclappersink.c b/lib/gst/plugin/gstclappersink.c index f8c69d4b..2aa3f370 100644 --- a/lib/gst/plugin/gstclappersink.c +++ b/lib/gst/plugin/gstclappersink.c @@ -431,6 +431,11 @@ gst_clapper_sink_propose_allocation (GstBaseSink *bsink, GstQuery *query) guint size, min_buffers; gboolean need_pool; + if (!self->importer) { + GST_DEBUG_OBJECT (self, "No importer to propose allocation"); + return FALSE; + } + gst_query_parse_allocation (query, &caps, &need_pool); if (!caps) {