mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +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;
|
applied_rate = priv->scale;
|
||||||
rate = 1.0;
|
rate = 1.0;
|
||||||
//gst_event_unref (event);
|
//gst_event_unref (event);
|
||||||
|
|
||||||
|
if (stop != -1) {
|
||||||
|
stop = (stop - start) / applied_rate + start;
|
||||||
|
}
|
||||||
|
|
||||||
event = gst_event_new_new_segment_full (update, rate, applied_rate,
|
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);
|
gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (trans), event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue