From 5518eb26fbc116392879443dc1f4645a8ff4f5a7 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 12 Jul 2018 13:13:04 +1000 Subject: [PATCH] gluploadelement: also set the context in decide_allocation If downstream doesn't perform allocation queries, the context would never be set and criticals would occur. --- ext/gl/gstgluploadelement.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/gl/gstgluploadelement.c b/ext/gl/gstgluploadelement.c index cac11b5f97..1998c7732c 100644 --- a/ext/gl/gstgluploadelement.c +++ b/ext/gl/gstgluploadelement.c @@ -194,6 +194,12 @@ static gboolean _gst_gl_upload_element_decide_allocation (GstBaseTransform * trans, GstQuery * query) { + GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (trans); + GstGLContext *context = GST_GL_BASE_FILTER (trans)->context; + + if (upload->upload && context) + gst_gl_upload_set_context (upload->upload, context); + return GST_BASE_TRANSFORM_CLASS (gst_gl_upload_element_parent_class)->decide_allocation (trans, query);