From 47f3a1954ed773b33208772cf9f224612a387beb Mon Sep 17 00:00:00 2001 From: Vineeth T M Date: Thu, 20 Nov 2014 09:13:58 +0530 Subject: [PATCH] glimagesink: critical error while seek playback-test(stop state) If we seek when media is in stop state, playback-test gives critical error, since context of glimagesink is destroyed during stop. But since context is not present, we need not handle send_event in glimagesink Hence adding a condition to check if context is valid. https://bugzilla.gnome.org/show_bug.cgi?id=740305 --- ext/gl/gstglimagesink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index 755c7b2bb8..6d1c8d046c 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -198,10 +198,14 @@ gst_glimage_sink_navigation_send_event (GstNavigation * navigation, GstStructure GstGLImageSink *sink = GST_GLIMAGE_SINK (navigation); GstEvent *event = NULL; GstPad *pad = NULL; - GstGLWindow *window = gst_gl_context_get_window (sink->context); + GstGLWindow *window; guint width, height; gdouble x, y, xscale, yscale; + if (!sink->context) + return; + + window = gst_gl_context_get_window (sink->context); g_return_if_fail (GST_GL_IS_WINDOW (window)); width = GST_VIDEO_SINK_WIDTH (sink);