From 0063e63fe339e28d641c88c7fa51e721d1a6dcf8 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 7 Nov 2017 12:39:58 +1100 Subject: [PATCH] gltestsrc: guard stop in gl thread So we don't result in a critical when we've never created the GL context: gst_gl_context_thread_add: assertion 'GST_IS_GL_CONTEXT (context)' failed --- ext/gl/gstgltestsrc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/gl/gstgltestsrc.c b/ext/gl/gstgltestsrc.c index cba25c9a62..b0abea507b 100644 --- a/ext/gl/gstgltestsrc.c +++ b/ext/gl/gstgltestsrc.c @@ -544,8 +544,9 @@ gst_gl_test_src_stop (GstBaseSrc * basesrc) { GstGLTestSrc *src = GST_GL_TEST_SRC (basesrc); - gst_gl_context_thread_add (src->context, - (GstGLContextThreadFunc) gst_gl_test_src_gl_stop, src); + if (src->context) + gst_gl_context_thread_add (src->context, + (GstGLContextThreadFunc) gst_gl_test_src_gl_stop, src); gst_caps_replace (&src->out_caps, NULL);