mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
inputselector: handle more formats
Use the segment format instead of a hardcoded _TIME.
This commit is contained in:
parent
115c34badd
commit
f6178ee53e
1 changed files with 3 additions and 3 deletions
|
@ -295,11 +295,11 @@ gst_selector_pad_get_running_time (GstSelectorPad * pad)
|
||||||
|
|
||||||
GST_OBJECT_LOCK (pad);
|
GST_OBJECT_LOCK (pad);
|
||||||
if (pad->active) {
|
if (pad->active) {
|
||||||
gint64 position = pad->segment.position;
|
guint64 position = pad->segment.position;
|
||||||
|
GstFormat format = pad->segment.format;
|
||||||
|
|
||||||
if (position >= 0)
|
if (position >= 0)
|
||||||
ret = gst_segment_to_running_time (&pad->segment, GST_FORMAT_TIME,
|
ret = gst_segment_to_running_time (&pad->segment, format, position);
|
||||||
position);
|
|
||||||
}
|
}
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue