mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
decklink: Reset the clock calibration when unsetting the master clock
Otherwise the old calibration will stick around for the next time we use it, potentially giving us completely wrong times.
This commit is contained in:
parent
8e362aab14
commit
4521524de3
2 changed files with 4 additions and 0 deletions
|
@ -705,6 +705,8 @@ gst_decklink_video_sink_change_state (GstElement * element,
|
|||
gst_message_new_clock_lost (GST_OBJECT_CAST (element),
|
||||
self->output->clock));
|
||||
gst_clock_set_master (self->output->clock, NULL);
|
||||
// Reset calibration to make the clock reusable next time we use it
|
||||
gst_clock_set_calibration (self->output->clock, 0, 0, 1, 1);
|
||||
g_mutex_lock (&self->output->lock);
|
||||
self->output->clock_start_time = GST_CLOCK_TIME_NONE;
|
||||
self->output->clock_last_time = 0;
|
||||
|
|
|
@ -765,6 +765,8 @@ gst_decklink_video_src_change_state (GstElement * element,
|
|||
gst_message_new_clock_lost (GST_OBJECT_CAST (element),
|
||||
self->input->clock));
|
||||
gst_clock_set_master (self->input->clock, NULL);
|
||||
// Reset calibration to make the clock reusable next time we use it
|
||||
gst_clock_set_calibration (self->input->clock, 0, 0, 1, 1);
|
||||
g_mutex_lock (&self->input->lock);
|
||||
self->input->clock_start_time = GST_CLOCK_TIME_NONE;
|
||||
self->input->clock_last_time = 0;
|
||||
|
|
Loading…
Reference in a new issue