summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-03-20 19:19:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-21 19:16:03 +0100
commit60ba0afbde0ef53a12afb6c755ca6fd64aabf5da (patch)
tree2f18087287b3dd4e420194008d5ad39fa31075b6
parentdcf11bba3ccfd2a2a44556b1947406947aaa2be1 (diff)
GStreamer: don't try to seek when it's not supported.
This eliminates warnings on the console. Change-Id: I6a0509dba4a0f7ec6fad33f8803be746f425a616 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
index da6120181..f5b4be72b 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
@@ -327,7 +327,7 @@ void QGstreamerPlayerSession::setPlaybackRate(qreal rate)
#endif
if (!qFuzzyCompare(m_playbackRate, rate)) {
m_playbackRate = rate;
- if (m_playbin) {
+ if (m_playbin && m_seekable) {
gst_element_seek(m_playbin, rate, GST_FORMAT_TIME,
GstSeekFlags(GST_SEEK_FLAG_FLUSH),
GST_SEEK_TYPE_NONE,0,
@@ -877,7 +877,7 @@ bool QGstreamerPlayerSession::seek(qint64 ms)
qDebug() << Q_FUNC_INFO << ms;
#endif
//seek locks when the video output sink is changing and pad is blocked
- if (m_playbin && !m_pendingVideoSink && m_state != QMediaPlayer::StoppedState) {
+ if (m_playbin && !m_pendingVideoSink && m_state != QMediaPlayer::StoppedState && m_seekable) {
ms = qMax(ms,qint64(0));
gint64 position = ms * 1000000;
bool isSeeking = gst_element_seek(m_playbin,