summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-02-26 16:16:49 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-04 16:36:04 +0000
commit95e9155b7f290d438dfd986fca7f9a26698cf691 (patch)
treead603558df8f9e04cbceba50255cc20aec744990
parentf39d8b73ee36de7dea09c2acdc9853d821cb1f93 (diff)
Android: fix some MediaPlayer signals not being emitted on first load.
When loading the first media while the video output was not yet ready, mediaChanged() and mediaStatusChanged() signals were not emitted. That's because in that particular situation, the backend believed the delayed loading was a reload of the same media. Change-Id: If5dfbf383ea2dac065fc26b70640ebfb2c52862d Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
-rw-r--r--src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
index a8f427f81..3128a89e6 100644
--- a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
+++ b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
@@ -307,7 +307,7 @@ void QAndroidMediaPlayerControl::setMedia(const QMediaContent &mediaContent,
{
StateChangeNotifier notifier(this);
- mReloadingMedia = (mMediaContent == mediaContent);
+ mReloadingMedia = (mMediaContent == mediaContent) && !mPendingSetMedia;
if (!mReloadingMedia) {
mMediaContent = mediaContent;
@@ -712,8 +712,8 @@ void QAndroidMediaPlayerControl::resetBufferingProgress()
void QAndroidMediaPlayerControl::flushPendingStates()
{
if (mPendingSetMedia) {
- mPendingSetMedia = false;
setMedia(mMediaContent, 0);
+ mPendingSetMedia = false;
return;
}