summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/qt7
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-06-22 06:59:08 (GMT)
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 10:06:21 (GMT)
commit110541eaea8d45e0664dd97abe6e63b096445eca (patch)
treeba26a6034a94e4b9f80a8d0a8069922929ad9c35 /src/3rdparty/phonon/qt7
parent35606b224dc8bd25ea5d4a651491cb4c76d5fbc2 (diff)
downloadQt-110541eaea8d45e0664dd97abe6e63b096445eca.zip
Qt-110541eaea8d45e0664dd97abe6e63b096445eca.tar.gz
Qt-110541eaea8d45e0664dd97abe6e63b096445eca.tar.bz2
Phonon(qt7); Don't try and display video frames when audio only.
Task-number: QTBUG-9068 (cherry picked from commit f02bb3b14ab0257a11cb9cde692f87a046c0308b)
Diffstat (limited to 'src/3rdparty/phonon/qt7')
-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);