From ce1ae11b26bb2c7fe732acf14c122d2d6b8dcf26 Mon Sep 17 00:00:00 2001 From: LanMarc77 Date: Sun, 5 Nov 2023 11:12:42 +0100 Subject: [PATCH] switched to stdint integer types, removed compilation warning, added encoder build --- 26304_ANSI-C_source_code_v6_6_0/c-code/Makefile | 1 + .../c-code/lib_amr/typedef.h | 11 ++++++----- .../c-code/libbase/MP4Atoms.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/26304_ANSI-C_source_code_v6_6_0/c-code/Makefile b/26304_ANSI-C_source_code_v6_6_0/c-code/Makefile index fb1b72b..a344ff7 100644 --- a/26304_ANSI-C_source_code_v6_6_0/c-code/Makefile +++ b/26304_ANSI-C_source_code_v6_6_0/c-code/Makefile @@ -2,4 +2,5 @@ dummy: @# i686-w64-mingw32-gcc -Wall -s -o decoder-new.exe common/*.c lib_amr/*.c decoder/*.c 3gplib/Release/er-libisomedia.dll -L3gplib/Release/ -l3gplib -lm @# i686-w64-mingw32-gcc -O2 -s -o decoder-new.exe common/*.c lib_amr/*.c decoder/*.c 3gplib/Release/er-libisomedia.dll -L3gplib/Release/ -l3gplib -lm gcc -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-unused-result -Wno-multichar -O2 -s -o decoder-new common/*.c lib_amr/*.c decoder/*.c libbase/*.c -lm + gcc -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-unused-result -Wno-multichar -O2 -s -o encoder-new common/*.c lib_amr/*.c encoder/*.c libbase/*.c -lm @# i686-w64-mingw32-gcc -s -O2 -o encoder-new.exe common/*.c lib_amr/*.c encoder/*.c 3gplib/Release/er-libisomedia.dll -L3gplib/Release/ -l3gplib -lm diff --git a/26304_ANSI-C_source_code_v6_6_0/c-code/lib_amr/typedef.h b/26304_ANSI-C_source_code_v6_6_0/c-code/lib_amr/typedef.h index 1a597f0..d891d7c 100644 --- a/26304_ANSI-C_source_code_v6_6_0/c-code/lib_amr/typedef.h +++ b/26304_ANSI-C_source_code_v6_6_0/c-code/lib_amr/typedef.h @@ -5,13 +5,14 @@ */ #ifndef typedef_h #define typedef_h +#include /* change these typedef declarations to correspond with your platform */ -typedef char Word8; -typedef unsigned char UWord8; -typedef short Word16; -typedef unsigned short UWord16; -typedef long Word32; +typedef int8_t Word8; +typedef uint8_t UWord8; +typedef int16_t Word16; +typedef uint16_t UWord16; +typedef int32_t Word32; typedef double Float64; typedef float Float32; diff --git a/26304_ANSI-C_source_code_v6_6_0/c-code/libbase/MP4Atoms.h b/26304_ANSI-C_source_code_v6_6_0/c-code/libbase/MP4Atoms.h index 7c73b5b..d34215d 100644 --- a/26304_ANSI-C_source_code_v6_6_0/c-code/libbase/MP4Atoms.h +++ b/26304_ANSI-C_source_code_v6_6_0/c-code/libbase/MP4Atoms.h @@ -1240,7 +1240,7 @@ typedef struct MP4ItemPropertyContainerAtom { } MP4ItemPropertyContainerAtom, *MP4ItemPropertyContainerAtomPtr; typedef struct MP4ItemPropertyAssociationEntryPropertyIndex { - u8 essential; + u16 essential; u16 property_index; } MP4ItemPropertyAssociationEntryPropertyIndex, *MP4ItemPropertyAssociationEntryPropertyIndexPtr;