mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
scaletempo: Correctly handle newsegment events with stop==-1
Fixes bug #645420.
This commit is contained in:
parent
2ccd506d0b
commit
1c4f32b279
1 changed files with 6 additions and 1 deletions
|
@ -554,8 +554,13 @@ gst_scaletempo_sink_event (GstBaseTransform * trans, GstEvent * event)
|
|||
applied_rate = priv->scale;
|
||||
rate = 1.0;
|
||||
//gst_event_unref (event);
|
||||
|
||||
if (stop != -1) {
|
||||
stop = (stop - start) / applied_rate + start;
|
||||
}
|
||||
|
||||
event = gst_event_new_new_segment_full (update, rate, applied_rate,
|
||||
format, start, (stop - start) / applied_rate + start, position);
|
||||
format, start, stop, position);
|
||||
gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (trans), event);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue