summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-06-22 06:59:08 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-06-22 06:59:08 (GMT)
commitf02bb3b14ab0257a11cb9cde692f87a046c0308b (patch)
tree8d41b034e384acb7a4d2e0c1713a44381f73c71b /src/3rdparty
parent76c256bdabcc207a6ed70d5b5b62698495548a25 (diff)
downloadQt-f02bb3b14ab0257a11cb9cde692f87a046c0308b.zip
Qt-f02bb3b14ab0257a11cb9cde692f87a046c0308b.tar.gz
Qt-f02bb3b14ab0257a11cb9cde692f87a046c0308b.tar.bz2
Phonon(qt7); Don't try and display video frames when audio only.
Task-number: QTBUG-9068
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/qt7/mediaobject.mm16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/3rdparty/phonon/qt7/mediaobject.mm b/src/3rdparty/phonon/qt7/mediaobject.mm
index 677640c..ca206bc 100644
--- a/src/3rdparty/phonon/qt7/mediaobject.mm
+++ b/src/3rdparty/phonon/qt7/mediaobject.mm
@@ -405,20 +405,22 @@ void MediaObject::restartAudioVideoTimers()
if (m_audioTimer)
killTimer(m_audioTimer);
+ if (hasVideo()) {
#if QT_ALLOW_QUICKTIME
// We prefer to use a display link as timer if available, since
// it is more steady, and results in better and smoother frame drawing:
- startDisplayLink();
- if (!m_displayLink){
+ startDisplayLink();
+ if (!m_displayLink){
+ float fps = m_videoPlayer->staticFps();
+ long videoUpdateFrequency = fps ? long(1000.0f / fps) : 0.001;
+ m_videoTimer = startTimer(videoUpdateFrequency);
+ }
+#else
float fps = m_videoPlayer->staticFps();
long videoUpdateFrequency = fps ? long(1000.0f / fps) : 0.001;
m_videoTimer = startTimer(videoUpdateFrequency);
- }
-#else
- float fps = m_videoPlayer->staticFps();
- long videoUpdateFrequency = fps ? long(1000.0f / fps) : 0.001;
- m_videoTimer = startTimer(videoUpdateFrequency);
#endif
+ }
long audioUpdateFrequency = m_audioPlayer->regularTaskFrequency();
m_audioTimer = startTimer(audioUpdateFrequency);