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.
This commit is contained in:
Rafał Dzięgiel
2023-02-09 11:38:31 +01:00
parent 40b6f4c724
commit bd8f0280e2

View File

@@ -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) {