summaryrefslogtreecommitdiff
path: root/src/multimediawidgets
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2013-09-17 17:00:28 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-17 21:16:19 +0200
commit875de90ff8ecdad69fa8ffe76e39ba5da8d2dc2d (patch)
tree9a92ce088b7410b3272c94feab983da84269d764 /src/multimediawidgets
parent3111178ee600558b8d3280ce5c1397e77ccc7f5f (diff)
downloadqtmultimedia-875de90ff8ecdad69fa8ffe76e39ba5da8d2dc2d.tar.gz
Fix QVideoSurfaceArbFpPainter mistakenly failing to start in some cases.
If an OpenGL error occurred before starting the video painter, it would fail to do so. This patch simply makes sure the OpenGL error flag is cleared before checking for GL errors that would occur in QVideoSurfaceArbFpPainter's code. Change-Id: I2eacf6db03cb290adf00a9faf11145c7a6ade565 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/multimediawidgets')
-rw-r--r--src/multimediawidgets/qpaintervideosurface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
index 8536ba4d1..d9ad0438d 100644
--- a/src/multimediawidgets/qpaintervideosurface.cpp
+++ b/src/multimediawidgets/qpaintervideosurface.cpp
@@ -773,6 +773,8 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::start(const QVideoSurfac
if (!program) {
error = QAbstractVideoSurface::UnsupportedFormatError;
} else {
+ while (glGetError() != GL_NO_ERROR) { } // clear previous unrelated errors
+
glGenProgramsARB(1, &m_programId);
GLenum glError = glGetError();