eglglessink: Don't try to render expose() if no caps are known yet
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 19 Oct 2012 09:59:10 +0000 (09:59 +0000)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 19 Oct 2012 10:02:05 +0000 (12:02 +0200)
ext/eglgles/gsteglglessink.c

index 2c735ce0487c0d562c4b35253eb38ec0e8e76688..aa87d7385a9e82b1624e6c39ff2ec45f7c1fc7e6 100644 (file)
@@ -606,8 +606,13 @@ render_thread_func (GstEglGlesSink * eglglessink)
       }
     }
 
-    eglglessink->last_flow =
-        gst_eglglessink_render_and_display (eglglessink, buf);
+    if (eglglessink->configured_caps) {
+      eglglessink->last_flow =
+          gst_eglglessink_render_and_display (eglglessink, buf);
+    } else {
+      GST_DEBUG_OBJECT (eglglessink, "No caps configured yet, not drawing anything");
+    }
+
     if (buf) {
       g_mutex_lock (eglglessink->render_lock);
       g_cond_broadcast (eglglessink->render_cond);