Fixes the issue when the window was beeing resized/moved
and the frame image would become black.

Signed-off-by: Bård Eirik Winther <bwint...@cisco.com>
---
 utils/qv4l2/capture-win-gl.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/utils/qv4l2/capture-win-gl.cpp b/utils/qv4l2/capture-win-gl.cpp
index 6071410..c8238c5 100644
--- a/utils/qv4l2/capture-win-gl.cpp
+++ b/utils/qv4l2/capture-win-gl.cpp
@@ -253,6 +253,12 @@ void CaptureWinGLEngine::paintGL()
                changeShader();
 
        if (m_frameData == NULL) {
+               glBegin(GL_QUADS);
+               glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0, 0);
+               glTexCoord2f(1.0f, 0.0f); glVertex2f(m_frameWidth, 0);
+               glTexCoord2f(1.0f, 1.0f); glVertex2f(m_frameWidth, 
m_frameHeight);
+               glTexCoord2f(0.0f, 1.0f); glVertex2f(0, m_frameHeight);
+               glEnd();
                return;
        }
 
-- 
1.8.4.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to