openbsd-ports/audio/faad/patches/patch-plugins_mpeg4ip_faad2_cpp
jakemsr ad8a707fdf problem:
libfaad uses data types with machine dependent bit width in
prototypes in its public headers, but in the corresponding library
code, machine independent exact width data types are used.

solution:
change libfaad headers to use the same machine independent exact
width data types in the prototypes as in the library.  since the
prototypes in the library headers are changed, users of libfaad
likely need to be modified to use exact width data types as well.

also:
- bump libfaad major version number
- update plugin code to use exact width data types for libfaad
  interaction, as per new prototypes
- bump package version
- sync patches with update-patches


problem discovered by, solution discussed with, reviewed, tested
and OK naddy@
2007-06-29 06:01:42 +00:00

44 lines
1.3 KiB
Plaintext

$OpenBSD: patch-plugins_mpeg4ip_faad2_cpp,v 1.1 2007/06/29 06:01:42 jakemsr Exp $
--- plugins/mpeg4ip/faad2.cpp.orig Mon Jan 5 06:05:12 2004
+++ plugins/mpeg4ip/faad2.cpp Thu May 31 14:12:18 2007
@@ -76,8 +76,8 @@ static codec_data_t *aac_codec_create (const char *com
}
aac->m_info = faacDecOpen();
- unsigned long srate;
- unsigned char chan;
+ uint32_t srate;
+ uint8_t chan;
if ((userdata == NULL && fmtp == NULL) ||
(faacDecInit2(aac->m_info,
(uint8_t *)userdata,
@@ -156,7 +156,7 @@ static int aac_decode (codec_data_t *ptr,
void *userdata)
{
aac_codec_t *aac = (aac_codec_t *)ptr;
- unsigned long bytes_consummed;
+ uint32_t bytes_consummed;
int bits = -1;
// struct timezone tz;
@@ -188,8 +188,8 @@ static int aac_decode (codec_data_t *ptr,
* If not initialized, do so.
*/
abort();
- unsigned long freq;
- unsigned char chans;
+ uint32_t freq;
+ uint8_t chans;
faacDecInit(aac->m_info,
(unsigned char *)buffer,
@@ -202,7 +202,7 @@ static int aac_decode (codec_data_t *ptr,
}
uint8_t *buff;
- unsigned long samples;
+ uint32_t samples;
bytes_consummed = buflen;
//aa_message(LOG_DEBUG, aaclib, "decoding %d bits", buflen * 8);
faacDecFrameInfo frame_info;