From 04beac6e0f14879415e4eab963f61933e8e2ae02 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 16 Jul 2015 16:47:05 -0400 Subject: [PATCH] uploadelement: Protect against NULL pointer I notice that if you stop the pipeline during a renegotiation the upload may be NULL while an allocation query is being run. In that scenario, returning FALSE to the allocation query is the best thing. --- ext/gl/gstgluploadelement.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/gl/gstgluploadelement.c b/ext/gl/gstgluploadelement.c index be01143aa3..368c2c93c9 100644 --- a/ext/gl/gstgluploadelement.c +++ b/ext/gl/gstgluploadelement.c @@ -145,6 +145,9 @@ _gst_gl_upload_element_propose_allocation (GstBaseTransform * bt, { GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (bt); + if (!upload->upload) + return FALSE; + gst_gl_upload_propose_allocation (upload->upload, decide_query, query); return TRUE;