mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 22:05:58 +00:00
ptp clock: Wait for ANNOUNCE before selecting a master
Previously, with opportunistic sync we'd track a master clock as soon as we see a SYNC message, and hence sync up faster, but then we'd announce we're synched before seeing the ANNOUNCE, leaving the clock details like grandmaster-clock empty. A better way is to start tracking the clock opportunistically, but not announce we're synched until we've also seen the ANNOUNCE.
This commit is contained in:
parent
d37fcea225
commit
04176bede1
1 changed files with 3 additions and 2 deletions
|
@ -2405,8 +2405,9 @@ gst_ptp_clock_ensure_domain_clock (GstPtpClock * self)
|
|||
for (l = domain_clocks; l; l = l->next) {
|
||||
PtpDomainData *clock_data = l->data;
|
||||
|
||||
if (clock_data->domain == self->priv->domain
|
||||
&& clock_data->last_ptp_time != 0) {
|
||||
if (clock_data->domain == self->priv->domain &&
|
||||
clock_data->have_master_clock && clock_data->last_ptp_time != 0) {
|
||||
GST_DEBUG ("Switching domain clock on domain %d", clock_data->domain);
|
||||
self->priv->domain_clock = clock_data->domain_clock;
|
||||
got_clock = TRUE;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue