From cb3a65a19a62dca073d09da877686bc902948d2e Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 7 Jul 2017 14:41:17 +1000 Subject: [PATCH] glupload: Don't throw assertions on invalid allocation query basesrc can send an allocation query with no caps, in which case we should just fail it without throwing assertions. --- gst-libs/gst/gl/gstglupload.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index ddfeaf3222..1bdbfb1173 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -324,6 +324,8 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query, GstCapsFeatures *features; gst_query_parse_allocation (query, &caps, NULL); + if (caps == NULL) + goto invalid_caps; features = gst_caps_get_features (caps, 0); /* Only offer our custom allocator if that type of memory was negotiated. */