mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
decklinkvideosink: Handle the clock returning GST_CLOCK_TIME_NONE properly
This commit is contained in:
parent
8a5d2c561c
commit
b3a4772834
1 changed files with 6 additions and 4 deletions
|
@ -422,11 +422,13 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
// potentially overflowing the internal queue of the hardware
|
||||
clock = gst_element_get_clock (GST_ELEMENT_CAST (self));
|
||||
if (clock) {
|
||||
GstClockTime clock_running_time, latency, max_lateness;
|
||||
GstClockTime clock_running_time, base_time, clock_time, latency,
|
||||
max_lateness;
|
||||
|
||||
clock_running_time = gst_element_get_base_time (GST_ELEMENT_CAST (self));
|
||||
if (clock_running_time != GST_CLOCK_TIME_NONE) {
|
||||
clock_running_time = gst_clock_get_time (clock) - clock_running_time;
|
||||
base_time = gst_element_get_base_time (GST_ELEMENT_CAST (self));
|
||||
clock_time = gst_clock_get_time (clock);
|
||||
if (base_time != GST_CLOCK_TIME_NONE && clock_time != GST_CLOCK_TIME_NONE) {
|
||||
clock_running_time = clock_time - base_time;
|
||||
latency = gst_base_sink_get_latency (GST_BASE_SINK_CAST (self));
|
||||
max_lateness = gst_base_sink_get_max_lateness (GST_BASE_SINK_CAST (self));
|
||||
|
||||
|
|
Loading…
Reference in a new issue