diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-09-17 15:22:00 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-09-17 15:22:00 (GMT) |
commit | b7923d48fb6d755d4563eeed0e7f3cbc774d69d5 (patch) | |
tree | ec8bb06f58f714d0b799164693e93bf0d51b6bcf /src/3rdparty | |
parent | e6dbbd0398d70ee64a3b8129e9621cfa15d70f8c (diff) | |
parent | a62506aae40ede3fd8030312321759f669458909 (diff) | |
download | Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.zip Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.gz Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.bz2 |
Merge branch '4.5' into 4.6
Conflicts:
tests/auto/qimagereader/tst_qimagereader.cpp
tests/auto/qpainter/tst_qpainter.cpp
tests/auto/qtwidgets/tst_qtwidgets.cpp
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/phonon/gstreamer/mediaobject.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index 74fc1b4..13f9734 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -965,11 +965,15 @@ void MediaObject::getStreamInfo() gint64 titleCount; GstFormat format = gst_format_get_by_nick("track"); if (gst_element_query_duration (m_pipeline, &format, &titleCount)) { - int oldAvailableTitles = m_availableTitles; - m_availableTitles = (int)titleCount; - if (m_availableTitles != oldAvailableTitles) { - emit availableTitlesChanged(m_availableTitles); - m_backend->logMessage(QString("Available titles changed: %0").arg(m_availableTitles), Backend::Info, this); + //check if returned format is still "track", + //gstreamer sometimes returns the total time, if tracks information is not available. + if (qstrcmp(gst_format_get_name(format), "track") == 0) { + int oldAvailableTitles = m_availableTitles; + m_availableTitles = (int)titleCount; + if (m_availableTitles != oldAvailableTitles) { + emit availableTitlesChanged(m_availableTitles); + m_backend->logMessage(QString("Available titles changed: %0").arg(m_availableTitles), Backend::Info, this); + } } } |