[vlc-commits] omxil: fix integer types on LP64 platforms

Rémi Denis-Courmont git at videolan.org
Fri Feb 12 16:40:44 UTC 2021


vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Feb 12 18:35:59 2021 +0200| [f128680a57f9c06928100c12b37d4b7850d179f3] | committer: Rémi Denis-Courmont

omxil: fix integer types on LP64 platforms

This resyncs the integer type definition with the official
OpenMAX IL 1.1.2 sources. In particular, this fixes U32 and S32 which
were wrongly defined as long thus breaking binary compatibility on
Linux/arm64.

Fixes LP#1913530.

(cherry picked from commit 368c2f3762ae7aff909ae008c58d967e63d2efaf)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f128680a57f9c06928100c12b37d4b7850d179f3
---

 modules/codec/omxil/OMX_Types.h | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/modules/codec/omxil/OMX_Types.h b/modules/codec/omxil/OMX_Types.h
index 76fa234e7d..38ca04d44c 100644
--- a/modules/codec/omxil/OMX_Types.h
+++ b/modules/codec/omxil/OMX_Types.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008 The Khronos Group Inc. 
+ * Copyright (c) 2016 The Khronos Group Inc.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
@@ -31,6 +31,8 @@
 #ifndef OMX_Types_h
 #define OMX_Types_h
 
+#include <stdint.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -130,22 +132,22 @@ extern "C" {
   */ 
 
 /** OMX_U8 is an 8 bit unsigned quantity that is byte aligned */
-typedef unsigned char OMX_U8;
+typedef uint8_t OMX_U8;
 
 /** OMX_S8 is an 8 bit signed quantity that is byte aligned */
-typedef signed char OMX_S8;
+typedef int8_t OMX_S8;
 
 /** OMX_U16 is a 16 bit unsigned quantity that is 16 bit word aligned */
-typedef unsigned short OMX_U16;
+typedef uint16_t OMX_U16;
 
 /** OMX_S16 is a 16 bit signed quantity that is 16 bit word aligned */
-typedef signed short OMX_S16;
+typedef int16_t OMX_S16;
 
 /** OMX_U32 is a 32 bit unsigned quantity that is 32 bit word aligned */
-typedef unsigned long OMX_U32;
+typedef uint32_t OMX_U32;
 
 /** OMX_S32 is a 32 bit signed quantity that is 32 bit word aligned */
-typedef signed long OMX_S32;
+typedef int32_t OMX_S32;
 
 
 /* Users with compilers that cannot accept the "long long" designation should
@@ -173,10 +175,10 @@ typedef signed   __int64  OMX_S64;
 #else /* _WIN32 */
 
 /** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */
-typedef unsigned long long OMX_U64;
+typedef uint64_t OMX_U64;
 
 /** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */
-typedef signed long long OMX_S64;
+typedef int64_t OMX_S64;
 
 #endif /* _WIN32 */
 #endif



More information about the vlc-commits mailing list