caopengllayersink: render black when we don't have a texture to display
authorMatthew Waters <matthew@centricular.com>
Tue, 24 Feb 2015 12:52:39 +0000 (23:52 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:55 +0000 (19:31 +0000)
Like when the winsys asks us to redraw before the pipeline has started

ext/gl/caopengllayersink.m

index 1f7b3d1..fdbcf7b 100644 (file)
@@ -983,6 +983,8 @@ gst_ca_opengl_layer_sink_on_draw (GstCAOpenGLLayerSink * ca_sink)
 
   /* check if texture is ready for being drawn */
   if (!ca_sink->redisplay_texture) {
+    gl->ClearColor (0.0f, 0.0f, 0.0f, 1.0f);
+    gl->Clear (GL_COLOR_BUFFER_BIT);
     GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
     return;
   }