diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-01-13 14:40:35 +0100 |
---|---|---|
committer | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-01-13 15:41:31 +0100 |
commit | ee50d9a38689c2d56d530ef41f94ee0f6844b571 (patch) | |
tree | 420d7c446d5eccdcca2a6c9799d73c02b9720d15 /src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm | |
parent | a8123e737140719549252806e0e6a1c121359f79 (diff) |
AVF: Set the stopped state before emitting the status after EOS
Fixed a bug when the media status was changed and emitted, but the state
was kept old, this prevented to start playing again in a loop
if the loops were requested.
This is a regression since 9dbdd5d.
Fixes: QTBUG-81122
Change-Id: Id2c7d03a25cc22f7f45c6017d2da0af9bb52e528
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm')
-rw-r--r-- | src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm index 3c59419e7..3e3736183 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm @@ -825,8 +825,6 @@ void AVFMediaPlayerSession::processEOS() #endif Q_EMIT positionChanged(position()); m_mediaStatus = QMediaPlayer::EndOfMedia; - Q_EMIT mediaStatusChanged(m_mediaStatus); - m_state = QMediaPlayer::StoppedState; // At this point, frames should not be rendered anymore. @@ -834,6 +832,7 @@ void AVFMediaPlayerSession::processEOS() if (m_videoOutput) m_videoOutput->setLayer(nullptr); + Q_EMIT mediaStatusChanged(m_mediaStatus); Q_EMIT stateChanged(m_state); } |