summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 7366ea200..d30c54b3d 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -1332,7 +1332,9 @@ void tst_QMediaPlayerBackend::surfaceTest()
player.setMedia(localVideoFile);
player.play();
QTRY_VERIFY(player.position() >= 1000);
- QVERIFY(surface.m_totalFrames >= 25);
+ if (surface.error() == QAbstractVideoSurface::UnsupportedFormatError)
+ QSKIP("None of the pixel formats is supported by the backend");
+ QVERIFY2(surface.m_totalFrames >= 25, qPrintable(QString("Expected >= 25, got %1").arg(surface.m_totalFrames)));
}
void tst_QMediaPlayerBackend::metadata()
@@ -1392,7 +1394,10 @@ QList<QVideoFrame::PixelFormat> TestVideoSurface::supportedPixelFormats(
bool TestVideoSurface::start(const QVideoSurfaceFormat &format)
{
- if (!isFormatSupported(format)) return false;
+ if (!isFormatSupported(format)) {
+ setError(UnsupportedFormatError);
+ return false;
+ }
return QAbstractVideoSurface::start(format);
}