diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-10 03:05:22 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-10 03:05:29 +0100 |
commit | 31d1f6f64d19991b80211e11c46fed5c0697d3b5 (patch) | |
tree | ceaa1b74e2711d1f62b17ab750eca97f236057d2 /src/plugins/avfoundation/mediaplayer/avfvideowindowcontrol.mm | |
parent | 518dba2fd97be21ec49223c881a35823439cb32e (diff) | |
parent | 9514bba6c6bb41e304b450544c6e6b69080572a5 (diff) |
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
Diffstat (limited to 'src/plugins/avfoundation/mediaplayer/avfvideowindowcontrol.mm')
-rw-r--r-- | src/plugins/avfoundation/mediaplayer/avfvideowindowcontrol.mm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideowindowcontrol.mm b/src/plugins/avfoundation/mediaplayer/avfvideowindowcontrol.mm index 7fa41fdc2..d61129ec9 100644 --- a/src/plugins/avfoundation/mediaplayer/avfvideowindowcontrol.mm +++ b/src/plugins/avfoundation/mediaplayer/avfvideowindowcontrol.mm @@ -40,6 +40,7 @@ #include "avfvideowindowcontrol.h" #include <AVFoundation/AVFoundation.h> +#import <QuartzCore/CATransaction.h> #if QT_HAS_INCLUDE(<AppKit/AppKit.h>) #include <AppKit/AppKit.h> @@ -244,10 +245,10 @@ void AVFVideoWindowControl::updateAspectRatio() void AVFVideoWindowControl::updatePlayerLayerBounds() { if (m_playerLayer) { - CGRect newBounds = CGRectMake(0, 0, - m_displayRect.width(), m_displayRect.height()); - m_playerLayer.bounds = newBounds; - m_playerLayer.position = CGPointMake(m_displayRect.x(), m_displayRect.y()); + [CATransaction begin]; + [CATransaction setDisableActions: YES]; // disable animation/flicks + m_playerLayer.frame = m_displayRect.toCGRect(); + [CATransaction commit]; } } |