summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-06-08 13:37:21 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-07-07 15:58:14 (GMT)
commita1c7b42e8b67e935fe30310af49524a25fa631fc (patch)
tree1faf6181713af79f2a58276d870f6769340900be /src/3rdparty/phonon
parent56a2b6315c44d10f2ca4c76729a53ad9dbed37f9 (diff)
downloadQt-a1c7b42e8b67e935fe30310af49524a25fa631fc.zip
Qt-a1c7b42e8b67e935fe30310af49524a25fa631fc.tar.gz
Qt-a1c7b42e8b67e935fe30310af49524a25fa631fc.tar.bz2
Close media clip before creating new player object
Failure to Close() an existing MMF player utility object before creating a new one - which happens in the MMF backend's implementation of Phonon::MediaObject::setCurrentSource() - causes intialization of the newly-created utility to fail later on. Task-number: QTBUG-11377 Reviewed-by: Thierry Bastian
Diffstat (limited to 'src/3rdparty/phonon')
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.cpp4
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp3
5 files changed, 9 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 23a8233..7d28caf 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -71,7 +71,6 @@ protected:
virtual int openFile(RFile& file) = 0;
virtual int openUrl(const QString& url) = 0;
virtual int bufferStatus() const = 0;
- virtual void close() = 0;
void updateMetaData();
virtual int numberOfMetaDataEntries() const = 0;
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h
index ab892f5..30d5243 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h
@@ -55,6 +55,7 @@ public:
AbstractPlayer(const AbstractPlayer *player);
virtual void open(const Phonon::MediaSource&, RFile&) = 0;
+ virtual void close() = 0;
// MediaObjectInterface (implemented)
qint32 tickInterval() const;
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.cpp b/src/3rdparty/phonon/mmf/dummyplayer.cpp
index 6970088..d39ef76 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.cpp
+++ b/src/3rdparty/phonon/mmf/dummyplayer.cpp
@@ -97,6 +97,10 @@ void MMF::DummyPlayer::open(const Phonon::MediaSource &, RFile &)
}
+void MMF::DummyPlayer::close()
+{
+
+}
//-----------------------------------------------------------------------------
// AbstractPlayer
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.h b/src/3rdparty/phonon/mmf/dummyplayer.h
index 6841b5d..9d45696 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.h
+++ b/src/3rdparty/phonon/mmf/dummyplayer.h
@@ -58,6 +58,7 @@ public:
// AbstractPlayer
virtual void open(const Phonon::MediaSource&, RFile&);
+ virtual void close();
virtual void doSetTickInterval(qint32 interval);
};
}
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp
index e1b921b..d264377 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.cpp
+++ b/src/3rdparty/phonon/mmf/mediaobject.cpp
@@ -281,6 +281,9 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
break;
}
+ if (oldPlayer)
+ oldPlayer->close();
+
AbstractPlayer* newPlayer = 0;
// Construct newPlayer using oldPlayer (if not 0) in order to copy