summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-04-24 09:46:42 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-05-10 12:00:18 +0000
commit4bcd9000baf27241c52931365c91a42c5ae2f83c (patch)
treec0faa31320725b5c216e5fad32f9d2f215e69a06
parente6f3425ee18fc6e543667dba0da1e5dd197f6681 (diff)
Gstreamer: Don't reset pipeline to GST_STATE_NULL when EndOfStream
In case of EOS the state of the pipeline currently is changed to GST_STATE_NULL, which releases some resources and it might take some time to restart the playback. If the media should be played few times, there could be a gap between EOS and new play which can be heard. Suggesting to set the state to GST_STATE_PAUSED instead. If there is a need to release resources, empty QMediaContent should be set to the media player. Change-Id: Ifa5c886abfbea037fd395b7336a5590001d4a7f7 Fixes: QTBUG-75314 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r--src/gsttools/qgstreamerplayersession.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp
index 9858f61c9..1e099fc89 100644
--- a/src/gsttools/qgstreamerplayersession.cpp
+++ b/src/gsttools/qgstreamerplayersession.cpp
@@ -1886,7 +1886,7 @@ void QGstreamerPlayerSession::endOfMediaReset()
m_renderer->stopRenderer();
flushVideoProbes();
- gst_element_set_state(m_pipeline, GST_STATE_NULL);
+ gst_element_set_state(m_pipeline, GST_STATE_PAUSED);
QMediaPlayer::State oldState = m_state;
m_pendingState = m_state = QMediaPlayer::StoppedState;