glviewconvert: fix output when a transformation matrix is used

If we have a transformation matrix, we have no idea where in the output
the video is going to endup.  It might also be different and not cover
the entire output.

We need to clear the output to remove any previous data in the backing
texture.

Found from
https://stackoverflow.com/questions/51707229/python-gstreamer-for-dynamic-control-of-element-properties
This commit is contained in:
Matthew Waters 2018-08-10 22:44:12 +10:00
parent efa9bdccf9
commit 91bc6f63f6

View file

@ -1949,6 +1949,9 @@ _do_view_convert_draw (GstGLContext * context, GstGLViewConvert * viewconvert)
gl->ActiveTexture (GL_TEXTURE0);
gl->BindTexture (from_gl_target, priv->in_tex[0]->tex_id);
gl->ClearColor (0.0, 0.0, 0.0, 1.0);
gl->Clear (GL_COLOR_BUFFER_BIT);
gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, NULL);
if (gl->BindVertexArray)