diff --git a/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.c b/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.c index f2ac6c1e11..b349cf1448 100644 --- a/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.c +++ b/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.c @@ -451,7 +451,8 @@ calculate_average_period (GstAvtpCrfBase * avtpcrfbase, } data->past_periods[past_periods_iter] = - first_pkt_tstamp - data->last_received_tstamp; + (first_pkt_tstamp - data->last_received_tstamp) / + data->timestamp_interval; data->last_received_tstamp = first_pkt_tstamp; data->last_seqnum = seqnum; } else { diff --git a/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.h b/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.h index 87e8c64c0a..d14d5b9c3c 100644 --- a/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.h +++ b/subprojects/gst-plugins-bad/ext/avtp/gstavtpcrfbase.h @@ -54,6 +54,9 @@ struct _GstAvtpCrfThreadData GstClockTime *past_periods; int past_periods_iter; int periods_stored; + /** The time in ns between two events. The type of the event is depending on + * the CRF type: Audio sample, video frame sync, video line sync, ... + */ GstClockTime average_period; GstClockTime current_ts; GstClockTime last_received_tstamp;