diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-03-12 10:28:46 +0100 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-05-14 07:55:19 +0000 |
commit | 19232dbe27521f60bdd265dbac0419d93c7ea5de (patch) | |
tree | fceadad7c4c06bc9762e9864d6bd4ee89f903f01 /src/gsttools | |
parent | 72101558b3afc40ef41132e66ce789b92929e911 (diff) |
Use QOpenGLContext::makeCurrent if QGLContext::makeCurrent failed
If QPainterVideoSurface::setGLContext(QGLContext::currentContext()) is used
and no valid paint device has been provided to QGLContext, it fails to make the context current.
Thus there might be no available current context which might also produce crashes.
QGLContext::currentContext() creates QGLContext based on current QOpenGLContext instance,
and no paint device is available in QGLContext::device() in this case.
Currently QVideoWidget and QGraphicsVideoItem are effected.
It is relevant when a renderer calls currentContext->doneCurrent() before using the QPainterVideoSurface.
After this there is no any current context which could cause a crash, e.g. within compiling the shaders.
Task-number: QTBUG-74277
Change-Id: Ia28f4f6843a82a897399fd1ce2463e3b087b6437
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gsttools')
0 files changed, 0 insertions, 0 deletions