mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -04:00
milan-avb: gptp: emit gm_changed only when the GM actually changes
This commit is contained in:
parent
f5389a4225
commit
1e9f89b638
1 changed files with 4 additions and 2 deletions
|
|
@ -198,8 +198,10 @@ static bool update_ts_refclk(struct gptp *gptp)
|
|||
memcpy(gptp->clock_id, cid, 8);
|
||||
memcpy(gptp->gm_id, gmid, 8);
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
server_emit_gm_changed(gptp->server, SPA_TIMESPEC_TO_NSEC(&now), gmid);
|
||||
if (gmid_changed) {
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
server_emit_gm_changed(gptp->server, SPA_TIMESPEC_TO_NSEC(&now), gmid);
|
||||
}
|
||||
|
||||
return gmid_changed;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue