Commit 0f609bc6 authored by Zaheer Abbas Merali's avatar Zaheer Abbas Merali Committed by Sebastian Dröge
Browse files

basertpdepayload: create valid segment when given non-time segment

This will become an error in 1.10.

https://bugzilla.gnome.org/show_bug.cgi?id=765796
parent a2c050a4
......@@ -613,6 +613,9 @@ gst_rtp_base_depayload_handle_event (GstRTPBaseDepayload * filter,
{
GST_OBJECT_LOCK (filter);
gst_event_copy_segment (event, &filter->segment);
if (filter->segment.format != GST_FORMAT_TIME)
GST_ERROR_OBJECT (filter,
"Non-TIME segments are not supported and will likely fail");
GST_OBJECT_UNLOCK (filter);
/* don't pass the event downstream, we generate our own segment including
......@@ -717,8 +720,11 @@ create_segment_event (GstRTPBaseDepayload * filter, guint rtptime,
if (position == -1)
position = start;
if (G_LIKELY (filter->segment.format == GST_FORMAT_TIME))
running_time = gst_segment_to_running_time (&filter->segment,
GST_FORMAT_TIME, start);
else
running_time = 0;
gst_segment_init (&segment, GST_FORMAT_TIME);
segment.rate = priv->play_speed;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment