From 5c85289815c0bb565855d104c02acdceedd36e8a Mon Sep 17 00:00:00 2001
From: Dominik Loidolt <dominik.loidolt@univie.ac.at>
Date: Mon, 12 Aug 2024 10:45:23 +0200
Subject: [PATCH] Fix be24_to_cpu function for big-endian systems

---
 lib/common/cmp_data_types.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/common/cmp_data_types.c b/lib/common/cmp_data_types.c
index c044806..2ab4699 100644
--- a/lib/common/cmp_data_types.c
+++ b/lib/common/cmp_data_types.c
@@ -592,7 +592,11 @@ size_t size_of_a_sample(enum cmp_data_type data_type)
 
 static uint32_t be24_to_cpu(uint32_t a)
 {
+#ifdef __LITTLE_ENDIAN
 	return be32_to_cpu(a) >> 8;
+#else
+	return a;
+#endif /* __LITTLE_ENDIAN */
 }
 
 
-- 
GitLab