diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-09-17 07:05:18 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-09-17 07:05:18 (GMT) |
commit | dfcf988a3f0c88f96e202482e5d363d880b9d6d2 (patch) | |
tree | 42ee9ccb99945e64956abc7d1a6f1259e10a006e /src/3rdparty/phonon/gstreamer/mediaobject.cpp | |
parent | 4bf2d055aa31a7d2768538368d2984a3d594650e (diff) | |
parent | 18c0fec3afba909faa341c766f31d679892021db (diff) | |
download | Qt-dfcf988a3f0c88f96e202482e5d363d880b9d6d2.zip Qt-dfcf988a3f0c88f96e202482e5d363d880b9d6d2.tar.gz Qt-dfcf988a3f0c88f96e202482e5d363d880b9d6d2.tar.bz2 |
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6
Conflicts:
tests/auto/qimagereader/tst_qimagereader.cpp
tests/auto/qtwidgets/tst_qtwidgets.cpp
Diffstat (limited to 'src/3rdparty/phonon/gstreamer/mediaobject.cpp')
-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); + } } } |