From: Jan Alexander Steffens (heftig) Date: Wed, 19 Nov 2014 11:59:12 +0000 (+0100) Subject: input-selector: Use segment-presence for running_time check X-Git-Tag: 1.6.1~452 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f24f4917d6cdde5cdb6935f3ff6eb21948c714b;p=platform%2Fupstream%2Fgstreamer.git input-selector: Use segment-presence for running_time check When determining whether the running_time of a pad can be calculated, check if the segment is in TIME format instead of using the 'active' field. Since the latter is set through *any* activity, it's not a reliable indicator of segment presence. https://bugzilla.gnome.org/show_bug.cgi?id=739620 --- diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c index cd2922d..d1faeba 100644 --- a/plugins/elements/gstinputselector.c +++ b/plugins/elements/gstinputselector.c @@ -323,7 +323,7 @@ gst_selector_pad_get_running_time (GstSelectorPad * pad) gint64 ret = 0; GST_OBJECT_LOCK (pad); - if (pad->active) { + if (pad->segment.format == GST_FORMAT_TIME) { ret = gst_segment_to_running_time (&pad->segment, pad->segment.format, pad->segment.position);