From fca0714fd37b2276eb663f649b6b9871a3973fa4 Mon Sep 17 00:00:00 2001 From: Anthony Fieroni Date: Mon, 10 Dec 2018 16:19:51 +0200 Subject: Do not trigger paused state on 0 percentage Differential Revision: https://phabricator.kde.org/D14241 Signed-off-by: Anthony Fieroni --- gstreamer/pipeline.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gstreamer/pipeline.cpp b/gstreamer/pipeline.cpp index 7025418..0d0b253 100644 --- a/gstreamer/pipeline.cpp +++ b/gstreamer/pipeline.cpp @@ -325,6 +325,11 @@ gboolean Pipeline::cb_buffering(GstBus *bus, GstMessage *gstMessage, gpointer da gint percent = 0; gst_message_parse_buffering(gstMessage, &percent); + // we should not trigger paused state or gstreamer will starts buffering again + if (percent == 0) { + return true; + } + debug() << Q_FUNC_INFO << "Buffering :" << percent; // Instead of playing when the pipeline is still streaming, we pause -- cgit v1.1