Commit 6444276d authored by Craig Watson's avatar Craig Watson

Fix video resizing at end of playback on Windows

parent f00d50d6
......@@ -506,9 +506,15 @@ void UBGraphicsVideoItem::videoSizeChanged(QSizeF newSize)
* the information is available.
*/
// Don't resize the video item when playback has finished
if (mMediaObject->mediaStatus() != QMediaPlayer::EndOfMedia)
bool shouldResize = (mMediaObject->mediaStatus() != QMediaPlayer::EndOfMedia);
#ifdef Q_OS_WIN
// Windows is a little confused about when a video ends
shouldResize = (mMediaObject->mediaStatus() != QMediaPlayer::BufferedMedia);
#endif
if (shouldResize)
this->setSize(newSize.width(), newSize.height());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment