diff options
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/video/qvideosurfaces.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/multimedia/video/qvideosurfaces.cpp b/src/multimedia/video/qvideosurfaces.cpp index 459a6675a..793879382 100644 --- a/src/multimedia/video/qvideosurfaces.cpp +++ b/src/multimedia/video/qvideosurfaces.cpp @@ -45,6 +45,15 @@ QVideoSurfaces::QVideoSurfaces(const QVector<QAbstractVideoSurface *> &s, QObjec : QAbstractVideoSurface(parent) , m_surfaces(s) { + for (auto a : s) { + connect(a, &QAbstractVideoSurface::supportedFormatsChanged, this, [this, a] { + auto context = property("GLContext").value<QObject *>(); + if (!context) + setProperty("GLContext", a->property("GLContext")); + + emit supportedFormatsChanged(); + }); + } } QVideoSurfaces::~QVideoSurfaces() |