From f6178ee53e7b187f07f372f7dc29a00208c4201a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 16 May 2011 16:59:20 +0200 Subject: [PATCH] inputselector: handle more formats Use the segment format instead of a hardcoded _TIME. --- plugins/elements/gstinputselector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c index 3e116050c3..9a3d6ec9ec 100644 --- a/plugins/elements/gstinputselector.c +++ b/plugins/elements/gstinputselector.c @@ -295,11 +295,11 @@ gst_selector_pad_get_running_time (GstSelectorPad * pad) GST_OBJECT_LOCK (pad); if (pad->active) { - gint64 position = pad->segment.position; + guint64 position = pad->segment.position; + GstFormat format = pad->segment.format; if (position >= 0) - ret = gst_segment_to_running_time (&pad->segment, GST_FORMAT_TIME, - position); + ret = gst_segment_to_running_time (&pad->segment, format, position); } GST_OBJECT_UNLOCK (pad);