summaryrefslogtreecommitdiff
path: root/src/plugins/winrt
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2016-12-20 15:41:15 +0100
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2017-01-03 07:46:26 +0000
commitfc50058455536b857d101166f8c003e83aed4f99 (patch)
tree8ddda43bfd657e7d48b4481655365b5959fe33e9 /src/plugins/winrt
parent38ebe4372ca7017b4ed7f477cc6532efcf5fdceb (diff)
downloadqtmultimedia-fc50058455536b857d101166f8c003e83aed4f99.tar.gz
winrt: Fix video playback
Rendering should only be activated once the video frame size is known. Otherwise the texture is created with an invalid size and rendering will be stopped. This happens for some codecs where MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA is not known instantly after loading video files. Task-number: QTBUG-57707 Change-Id: Ic2347c8606239770e129544fd228b96929ed6198 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/winrt')
-rw-r--r--src/plugins/winrt/qwinrtmediaplayercontrol.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/winrt/qwinrtmediaplayercontrol.cpp b/src/plugins/winrt/qwinrtmediaplayercontrol.cpp
index 5720488f2..a4df6306f 100644
--- a/src/plugins/winrt/qwinrtmediaplayercontrol.cpp
+++ b/src/plugins/winrt/qwinrtmediaplayercontrol.cpp
@@ -267,7 +267,8 @@ public:
}
if (d->videoRenderer)
- d->videoRenderer->setActive(d->state == QMediaPlayer::PlayingState);
+ d->videoRenderer->setActive(d->state == QMediaPlayer::PlayingState &&
+ d->videoRenderer->size().isValid());
const QMediaPlayer::MediaStatus oldMediaStatus = d->mediaStatus;
const QMediaPlayer::State oldState = d->state;