summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-04-21 12:00:38 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-04-21 12:01:36 (GMT)
commitdf9977ebce528047c39d5cf35f452bb2f42cf2e9 (patch)
tree337a2bad867969728de41b5ca12e3ce6f737de04 /src/3rdparty
parent6a3735a47de8a9851e7795cf023d95d81867260d (diff)
downloadQt-df9977ebce528047c39d5cf35f452bb2f42cf2e9.zip
Qt-df9977ebce528047c39d5cf35f452bb2f42cf2e9.tar.gz
Qt-df9977ebce528047c39d5cf35f452bb2f42cf2e9.tar.bz2
Fixed a flicker when switching current source in Phonon::MediaObject
Task-number: 251776
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp
index 93a19b0..1d0b69d 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.cpp
+++ b/src/3rdparty/phonon/ds9/mediaobject.cpp
@@ -519,6 +519,15 @@ namespace Phonon
qSwap(m_graphs[0], m_graphs[1]); //swap the graphs
+ if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid &&
+ catchComError(currentGraph()->renderResult())) {
+ setState(Phonon::ErrorState);
+ return;
+ }
+
+ //we need to play the next media
+ play();
+
//we tell the video widgets to switch now to the new source
#ifndef QT_NO_PHONON_VIDEO
for (int i = 0; i < m_videoWidgets.count(); ++i) {
@@ -527,15 +536,6 @@ namespace Phonon
#endif //QT_NO_PHONON_VIDEO
emit currentSourceChanged(currentGraph()->mediaSource());
-
- if (currentGraph()->isLoading()) {
- //will simply tell that when loading is finished
- //it should start the playback
- play();
- }
-
-
-
emit metaDataChanged(currentGraph()->metadata());
if (nextGraph()->hasVideo() != currentGraph()->hasVideo()) {
@@ -548,15 +548,6 @@ namespace Phonon
#ifndef QT_NO_PHONON_MEDIACONTROLLER
setTitles(currentGraph()->titles());
#endif //QT_NO_PHONON_MEDIACONTROLLER
-
- //this manages only gapless transitions
- if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid) {
- if (catchComError(currentGraph()->renderResult())) {
- setState(Phonon::ErrorState);
- } else {
- play();
- }
- }
}
Phonon::State MediaObject::state() const