From 72a7bf590eb9b135cadf33c1a345dcfb43f125c4 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 12 Oct 2015 17:29:26 +0200 Subject: [PATCH] baseparse: Update internal position even if not linked Our current position has nothing to do with being linked or not. Avoids having stray segment updates fired every 2s --- libs/gst/base/gstbaseparse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 80334fbcb2..c9a57c5737 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -2448,8 +2448,9 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) } /* Update current running segment position */ - if (ret == GST_FLOW_OK && last_stop != GST_CLOCK_TIME_NONE && - parse->segment.position < last_stop) + if ((ret == GST_FLOW_OK || ret == GST_FLOW_NOT_LINKED) + && last_stop != GST_CLOCK_TIME_NONE + && parse->segment.position < last_stop) parse->segment.position = last_stop; return ret;