shithub: aacenc

Download patch

ref: 2151406d748fda1feff4801e4643d5d4ae7a7c84
parent: 796443a92b5c55e9681d14dfc9326b5b4de7fd71
author: Fabian Greffrath <fabian@greffrath.com>
date: Tue Oct 15 17:18:05 EDT 2019

consistently use stdint.h types

--- a/common/Cfaac/CTag.cpp
+++ b/common/Cfaac/CTag.cpp
@@ -195,7 +195,7 @@
 	FREE_ARRAY(comment);
 	MP4GetMetadataComment(MP4File, &comment);
 	FREE_ARRAY(art.data);
-	MP4GetMetadataCoverArt(MP4File, (unsigned __int8 **)&art.data, (u_int32_t *)&art.size);
+	MP4GetMetadataCoverArt(MP4File, (unsigned __int8 **)&art.data, (uint32_t *)&art.size);
 
 	MP4Close(MP4File);
 /*
--- a/common/Cfaac/Cfaac.cpp
+++ b/common/Cfaac/Cfaac.cpp
@@ -309,7 +309,7 @@
 					
 					s = SWAP16(s);
 					
-					buf[i] = ((u_int32_t)s) << 8;
+					buf[i] = ((uint32_t)s) << 8;
 				}
 			}
 			else
@@ -369,7 +369,7 @@
 				}
 			}
 			else
-				memcpy(buf,bufi,size*sizeof(u_int32_t));
+				memcpy(buf,bufi,size*sizeof(uint32_t));
 		/*
 		int exponent, mantissa;
 		float *bufo=(float *)buf;
--- a/frontend/input.c
+++ b/frontend/input.c
@@ -48,16 +48,16 @@
 
 typedef struct
 {
-  u_int32_t label;           /* 'RIFF' */
-  u_int32_t length;        /* Length of rest of file */
-  u_int32_t chunk_type;      /* 'WAVE' */
+  uint32_t label;           /* 'RIFF' */
+  uint32_t length;        /* Length of rest of file */
+  uint32_t chunk_type;      /* 'WAVE' */
 }
 riff_t;
 
 typedef struct
 {
-  u_int32_t label;
-  u_int32_t len;
+  uint32_t label;
+  uint32_t len;
 }
 riffsub_t;
 
@@ -70,13 +70,13 @@
 #define WAVE_FORMAT_EXTENSIBLE	0xfffe
 struct WAVEFORMATEX
 {
-  u_int16_t wFormatTag;
-  u_int16_t nChannels;
-  u_int32_t nSamplesPerSec;
-  u_int32_t nAvgBytesPerSec;
-  u_int16_t nBlockAlign;
-  u_int16_t wBitsPerSample;
-  u_int16_t cbSize;
+  uint16_t wFormatTag;
+  uint16_t nChannels;
+  uint32_t nSamplesPerSec;
+  uint32_t nAvgBytesPerSec;
+  uint16_t nBlockAlign;
+  uint16_t wBitsPerSample;
+  uint16_t cbSize;
 }
 #ifdef __GNUC__
 __attribute__((packed))
@@ -87,11 +87,11 @@
 {
   struct WAVEFORMATEX Format;
   union {
-    u_int16_t wValidBitsPerSample;	// bits of precision
-    u_int16_t wSamplesPerBlock;		// valid if wBitsPerSample==0
-    u_int16_t wReserved;		// If neither applies, set to zero.
+    uint16_t wValidBitsPerSample;	// bits of precision
+    uint16_t wSamplesPerBlock;		// valid if wBitsPerSample==0
+    uint16_t wReserved;		// If neither applies, set to zero.
   } Samples;
-  u_int32_t dwChannelMask;		// which channels are present in stream
+  uint32_t dwChannelMask;		// which channels are present in stream
   unsigned char SubFormat[16];		// guid
 }
 #ifdef __GNUC__
@@ -415,7 +415,7 @@
 
 	s = SWAP16(s);
 
-	buf[i] = ((u_int32_t)s) << 8;
+	buf[i] = ((uint32_t)s) << 8;
       }
     }
     else