caopengllayersink: render black when we don't have a texture to display

Like when the winsys asks us to redraw before the pipeline has started
This commit is contained in:
Matthew Waters 2015-02-24 23:52:39 +11:00 committed by Tim-Philipp Müller
parent fba2a2093f
commit b09971445e

View file

@ -983,6 +983,8 @@ gst_ca_opengl_layer_sink_on_draw (GstCAOpenGLLayerSink * ca_sink)
/* check if texture is ready for being drawn */ /* check if texture is ready for being drawn */
if (!ca_sink->redisplay_texture) { 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); GST_CA_OPENGL_LAYER_SINK_UNLOCK (ca_sink);
return; return;
} }