rtp: tests: print rtp timestamp mismatch minus the initial offset

Unit tests specify a 0-based offset, so printing that plus the
random initial offset on failure is just needlessly confusing,
so subtract the initial offset when printing expected/actual
values. The real values are still printed as part of the assert.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1580>
This commit is contained in:
Tim-Philipp Müller 2024-05-19 11:00:57 +01:00
parent be7da027f8
commit de71e9dadd

View file

@ -445,8 +445,8 @@ pub fn run_test_pipeline_full(
"Buffer {} of payload buffer list {} has unexpected RTP timestamp {:?} instead of {:?}",
j,
i,
rtp_packet.timestamp(),
expected_timestamp,
rtp_packet.timestamp().wrapping_sub(initial_timestamp),
expected_timestamp.wrapping_sub(initial_timestamp),
);
}
}