mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
inputselector: Make sure that running_time->timestamp calculation never becomes negative
This commit is contained in:
parent
e75da74a93
commit
f365385458
1 changed files with 4 additions and 1 deletions
|
@ -907,7 +907,10 @@ gst_input_selector_dispose (GObject * object)
|
|||
static gint64
|
||||
gst_segment_get_timestamp (GstSegment * segment, gint64 running_time)
|
||||
{
|
||||
return (running_time - segment->accum) * segment->abs_rate + segment->start;
|
||||
if (running_time <= segment->accum)
|
||||
return segment->start;
|
||||
else
|
||||
return (running_time - segment->accum) * segment->abs_rate + segment->start;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue