ptp: Ignore DELAY_RESP messages not for us earlier in the main process

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4665>
This commit is contained in:
Sebastian Dröge 2023-05-21 12:45:50 +03:00 committed by GStreamer Marge Bot
parent 5a79d230ce
commit 61a6b79e62

View file

@ -1715,6 +1715,13 @@ handle_delay_resp_message (PtpMessage * msg, GstClockTime receive_time)
PtpDomainData *domain = NULL;
PtpPendingSync *sync = NULL;
/* Not for us */
if (msg->message_specific.delay_resp.
requesting_port_identity.clock_identity != ptp_clock_id.clock_identity
|| msg->message_specific.delay_resp.
requesting_port_identity.port_number != ptp_clock_id.port_number)
return;
/* Don't consider messages with the alternate master flag set */
if ((msg->flag_field & 0x0100))
return;
@ -1737,13 +1744,6 @@ handle_delay_resp_message (PtpMessage * msg, GstClockTime receive_time)
&msg->source_port_identity) != 0)
return;
/* Not for us */
if (msg->message_specific.delay_resp.
requesting_port_identity.clock_identity != ptp_clock_id.clock_identity
|| msg->message_specific.delay_resp.
requesting_port_identity.port_number != ptp_clock_id.port_number)
return;
if (msg->log_message_interval == 0x7f) {
domain->min_delay_req_interval = GST_SECOND;