diff options
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp index 412694cc3..f1b7662b5 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp @@ -335,7 +335,14 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode, for (QSGVideoNodeFactoryInterface* factory : qAsConst(m_videoNodeFactories)) { // Get a node that supports our frame. The surface is irrelevant, our // QSGVideoItemSurface supports (logically) anything. - videoNode = factory->createNode(QVideoSurfaceFormat(m_frame.size(), m_frame.pixelFormat(), m_frame.handleType())); + QVideoSurfaceFormat nodeFormat(m_frame.size(), m_frame.pixelFormat(), m_frame.handleType()); + const QVideoSurfaceFormat surfaceFormat = m_surface->surfaceFormat(); + nodeFormat.setYCbCrColorSpace(surfaceFormat.yCbCrColorSpace()); + nodeFormat.setPixelAspectRatio(surfaceFormat.pixelAspectRatio()); + nodeFormat.setScanLineDirection(surfaceFormat.scanLineDirection()); + nodeFormat.setViewport(surfaceFormat.viewport()); + nodeFormat.setFrameRate(surfaceFormat.frameRate()); + videoNode = factory->createNode(nodeFormat); if (videoNode) { qCDebug(qLcVideo) << "updatePaintNode: Video node created. Handle type:" << m_frame.handleType() << " Supported formats for the handle by this node:" |