From b289cc6788c2f545e15e54196cbdad1874b0e175 Mon Sep 17 00:00:00 2001 From: Doug Nazar Date: Mon, 12 Apr 2021 23:15:17 -0400 Subject: [PATCH] rtp: fix test_twcc_header_and_run to support big endian. Part-of: --- tests/check/elements/rtpsession.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/check/elements/rtpsession.c b/tests/check/elements/rtpsession.c index b5c166d938..5602196dd3 100644 --- a/tests/check/elements/rtpsession.c +++ b/tests/check/elements/rtpsession.c @@ -2749,9 +2749,9 @@ GST_START_TEST (test_twcc_header_and_run_length) fail_unless_equals_int (0x20, fci_data[8] & 0x60); /* packets in run_length */ - run_length = *((guint16 *) & fci_data[8]); - run_length = run_length & ~0xE0; /* mask out the 3 last bits */ - fail_unless_equals_int (td->num_packets, GST_READ_UINT16_BE (&run_length)); + run_length = GST_READ_UINT16_BE (&fci_data[8]); + run_length = run_length & ~0xE000; /* mask out the upper 3 status bits */ + fail_unless_equals_int (td->num_packets, run_length); /* first recv-delta always 0 */ fail_unless_equals_int (0, fci_data[10]);