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
This commit is contained in:
Jan Alexander Steffens (heftig) 2014-11-19 12:59:12 +01:00 committed by Thiago Santos
parent 0a3ded1932
commit 6f24f4917d

View file

@ -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);