summaryrefslogtreecommitdiffstats
path: root/src/multimedia/platform/darwin/avfvideosink_p.h
diff options
context:
space:
mode:
authorDoris Verria <doris.verria@qt.io>2021-09-11 23:04:54 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-13 12:09:37 +0000
commitd96f082ce7cf882a3a8839e5bc1637e1a5880c31 (patch)
tree2c917d06d481f1caa68d73a49bf365c8b42fc2ba /src/multimedia/platform/darwin/avfvideosink_p.h
parent21475678b7532e30979df28576f32584b2d21bef (diff)
AVFVideoRenderer: Properly update video output when changing media
When changing the video source of the AVFMediaPlayer, the video frame was not updated and displayed the last frame of the previous video. To fix, before setting a new CALayer to the renderer, make sure to remove the video output and subtitle output from the previous AVPlayerItem and add them to the updated one. Also, clear the last video frame from the video output by setting a null QVideoFrame() to the sink whenever the mediaplayer stops or reaches end of stream. Fixes: QTBUG-96368 Change-Id: I74ed056c1ece0db319e857b89eaf5e5168a972a1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 59a32742d66a1fe17320acd133922c105ec211f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/multimedia/platform/darwin/avfvideosink_p.h')
-rw-r--r--src/multimedia/platform/darwin/avfvideosink_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimedia/platform/darwin/avfvideosink_p.h b/src/multimedia/platform/darwin/avfvideosink_p.h
index 4227bcb53..d25efdfc7 100644
--- a/src/multimedia/platform/darwin/avfvideosink_p.h
+++ b/src/multimedia/platform/darwin/avfvideosink_p.h
@@ -101,7 +101,7 @@ public:
virtual void setRhi(QRhi *);
QRhi *rhi() const { return m_rhi; }
- void setLayer(CALayer *layer);
+ virtual void setLayer(CALayer *layer);
void updateLayerBounds();
void nativeSizeChanged() { updateLayerBounds(); }