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.
This commit is contained in:
Jan Schmidt 2017-07-07 14:41:17 +10:00
parent 16fc8541b5
commit cb3a65a19a

View file

@ -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. */