summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2016-07-25 14:59:18 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-10-06 10:30:07 +0000
commit69cc0fb330c5ab74afb9d0bd087c64d4004ca9dd (patch)
tree7c34f24738bbbc511f8481a2fb97f11ed4ccbc5b
parent026aec5079375c866cd88ba176c88d2842d1b260 (diff)
GStreamer: emit mediaStatus changes before state changes
This makes sure all mediaStatus changes are emitted, even when some action is done on the media player as a result of a state change. Task-number: QTBUG-49578 Change-Id: I60153cd8e1d665797a25549ab81afcfb553ce2cc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
index 4846353a..b4879293 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
@@ -606,18 +606,18 @@ void QGstreamerPlayerControl::popAndNotifyState()
QMediaPlayer::MediaStatus oldMediaStatus = m_mediaStatusStack.pop();
if (m_stateStack.isEmpty()) {
- if (m_currentState != oldState) {
+ if (m_mediaStatus != oldMediaStatus) {
#ifdef DEBUG_PLAYBIN
- qDebug() << "State changed:" << m_currentState;
+ qDebug() << "Media status changed:" << m_mediaStatus;
#endif
- emit stateChanged(m_currentState);
+ emit mediaStatusChanged(m_mediaStatus);
}
- if (m_mediaStatus != oldMediaStatus) {
+ if (m_currentState != oldState) {
#ifdef DEBUG_PLAYBIN
- qDebug() << "Media status changed:" << m_mediaStatus;
+ qDebug() << "State changed:" << m_currentState;
#endif
- emit mediaStatusChanged(m_mediaStatus);
+ emit stateChanged(m_currentState);
}
}
}