mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
srtsrc: Defend against missing clock
If we don't have a clock, stop the source instead of asserting in gst_clock_get_time. This can happen when the element is removed from the pipeline while it's playing. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1674>
This commit is contained in:
parent
0be59181d7
commit
6b2fcb52e5
1 changed files with 5 additions and 0 deletions
|
@ -140,6 +140,11 @@ gst_srt_src_fill (GstPushSrc * src, GstBuffer * outbuf)
|
||||||
|
|
||||||
/* Get clock and values */
|
/* Get clock and values */
|
||||||
clock = gst_element_get_clock (GST_ELEMENT (src));
|
clock = gst_element_get_clock (GST_ELEMENT (src));
|
||||||
|
if (!clock) {
|
||||||
|
GST_DEBUG_OBJECT (src, "Clock missing, flushing");
|
||||||
|
return GST_FLOW_FLUSHING;
|
||||||
|
}
|
||||||
|
|
||||||
base_time = gst_element_get_base_time (GST_ELEMENT (src));
|
base_time = gst_element_get_base_time (GST_ELEMENT (src));
|
||||||
|
|
||||||
recv_len = gst_srt_object_read (self->srtobject, info.data,
|
recv_len = gst_srt_object_read (self->srtobject, info.data,
|
||||||
|
|
Loading…
Reference in a new issue