---- faad2/common/mp4ff/mp4ff.c.orig 2004-01-11 16:52:18.000000000 +0100
-+++ faad2/common/mp4ff/mp4ff.c 2005-03-17 17:04:10.000000000 +0100
+diff -uNr faad2.orig/common/mp4ff/mp4atom.c faad2/common/mp4ff/mp4atom.c
+--- faad2.orig/common/mp4ff/mp4atom.c 2004-01-11 16:52:18.000000000 +0100
++++ faad2/common/mp4ff/mp4atom.c 2006-01-25 23:01:27.676811500 +0100
+@@ -31,15 +31,15 @@
+ #include "drms.h"
+
+ /* parse atom header size */
+-static int32_t mp4ff_atom_get_size(const int8_t *data)
++static int32_t mp4ff_atom_get_size(const uint8_t *data)
+ {
+ uint32_t result;
+ uint32_t a, b, c, d;
+
+- a = (uint8_t)data[0];
+- b = (uint8_t)data[1];
+- c = (uint8_t)data[2];
+- d = (uint8_t)data[3];
++ a = data[0];
++ b = data[1];
++ c = data[2];
++ d = data[3];
+
+ result = (a<<24) | (b<<16) | (c<<8) | d;
+ //if (result > 0 && result < 8) result = 8;
+@@ -182,7 +182,7 @@
+ {
+ uint64_t size;
+ int32_t ret;
+- int8_t atom_header[8];
++ uint8_t atom_header[8];
+
+ ret = mp4ff_read_data(f, atom_header, 8);
+ if (ret != 8)
+diff -uNr faad2.orig/common/mp4ff/mp4ff.c faad2/common/mp4ff/mp4ff.c
+--- faad2.orig/common/mp4ff/mp4ff.c 2004-01-11 16:52:18.000000000 +0100
++++ faad2/common/mp4ff/mp4ff.c 2006-01-25 23:01:35.581305500 +0100
@@ -87,7 +87,7 @@
if (ff) free(ff);
}
{
f->total_tracks++;
+diff -uNr faad2.orig/common/mp4ff/mp4ff.h faad2/common/mp4ff/mp4ff.h
+--- faad2.orig/common/mp4ff/mp4ff.h 2006-01-25 22:59:20.000000000 +0100
++++ faad2/common/mp4ff/mp4ff.h 2006-01-25 23:01:27.676811500 +0100
+@@ -129,4 +129,4 @@
+ }
+ #endif /* __cplusplus */
+
+-#endif
+\ No newline at end of file
++#endif
+diff -uNr faad2.orig/common/mp4ff/mp4ff_int_types.h faad2/common/mp4ff/mp4ff_int_types.h
+--- faad2.orig/common/mp4ff/mp4ff_int_types.h 2003-12-13 23:26:56.000000000 +0100
++++ faad2/common/mp4ff/mp4ff_int_types.h 2006-01-25 23:01:27.676811500 +0100
+@@ -20,4 +20,4 @@
+ #endif
+
+
+-#endif
+\ No newline at end of file
++#endif
+diff -uNr faad2.orig/common/mp4ff/mp4ffint.h faad2/common/mp4ff/mp4ffint.h
+--- faad2.orig/common/mp4ff/mp4ffint.h 2004-01-14 21:50:22.000000000 +0100
++++ faad2/common/mp4ff/mp4ffint.h 2006-01-25 23:01:27.676811500 +0100
+@@ -226,8 +226,8 @@
+
+
+ /* mp4util.c */
+-int32_t mp4ff_read_data(mp4ff_t *f, int8_t *data, uint32_t size);
+-int32_t mp4ff_write_data(mp4ff_t *f, int8_t *data, uint32_t size);
++int32_t mp4ff_read_data(mp4ff_t *f, uint8_t *data, uint32_t size);
++int32_t mp4ff_write_data(mp4ff_t *f, uint8_t *data, uint32_t size);
+ uint64_t mp4ff_read_int64(mp4ff_t *f);
+ uint32_t mp4ff_read_int32(mp4ff_t *f);
+ uint32_t mp4ff_read_int24(mp4ff_t *f);
+@@ -241,7 +241,7 @@
+ char * mp4ff_read_string(mp4ff_t * f,uint32_t length);
+
+ /* mp4atom.c */
+-static int32_t mp4ff_atom_get_size(const int8_t *data);
++static int32_t mp4ff_atom_get_size(const uint8_t *data);
+ static int32_t mp4ff_atom_compare(const int8_t a1, const int8_t b1, const int8_t c1, const int8_t d1,
+ const int8_t a2, const int8_t b2, const int8_t c2, const int8_t d2);
+ static uint8_t mp4ff_atom_name_to_type(const int8_t a, const int8_t b, const int8_t c, const int8_t d);
+@@ -301,7 +301,6 @@
+ mp4ff_t *mp4ff_open_edit(mp4ff_callback_t *f);
+ #endif
+ void mp4ff_close(mp4ff_t *ff);
+-void mp4ff_track_add(mp4ff_t *f);
+ int32_t parse_sub_atoms(mp4ff_t *f, const uint64_t total_size);
+ int32_t parse_atoms(mp4ff_t *f);
+
+@@ -326,4 +325,4 @@
+ }
+ #endif /* __cplusplus */
+
+-#endif
+\ No newline at end of file
++#endif
+diff -uNr faad2.orig/common/mp4ff/mp4meta.c faad2/common/mp4ff/mp4meta.c
+--- faad2.orig/common/mp4ff/mp4meta.c 2004-01-11 16:52:18.000000000 +0100
++++ faad2/common/mp4ff/mp4meta.c 2006-01-25 23:01:27.676811500 +0100
+@@ -411,4 +411,4 @@
+ return mp4ff_meta_find_by_name(f, "cover", value);
+ }
+
+-#endif
+\ No newline at end of file
++#endif
+diff -uNr faad2.orig/common/mp4ff/mp4tagupdate.c faad2/common/mp4ff/mp4tagupdate.c
+--- faad2.orig/common/mp4ff/mp4tagupdate.c 2004-01-06 12:59:47.000000000 +0100
++++ faad2/common/mp4ff/mp4tagupdate.c 2006-01-25 23:01:27.676811500 +0100
+@@ -143,7 +143,7 @@
+ bufptr = membuffer_get_ptr(buf);
+ if (bufptr==0) return 0;
+
+- if ((unsigned)mp4ff_read_data(src,(char*)bufptr + oldsize,bytes)!=bytes)
++ if ((unsigned)mp4ff_read_data(src,(uint8_t*)bufptr + oldsize,bytes)!=bytes)
+ {
+ membuffer_set_error(buf);
+ return 0;
+@@ -398,7 +398,7 @@
+ uint64_t atom_offset = base;
+ for(;;)
+ {
+- char atom_name[4];
++ uint8_t atom_name[4];
+ uint32_t atom_size;
+
+ mp4ff_set_position(f,atom_offset);
+@@ -618,7 +618,7 @@
+ /* copy moov atom to end of the file */
+ if (ff->last_atom != ATOM_MOOV)
+ {
+- char *free_data = "free";
++ uint8_t *free_data = (uint8_t*)"free";
+
+ /* rename old moov to free */
+ mp4ff_set_position(ff, ff->moov_offset + 4);
+@@ -626,14 +626,14 @@
+
+ mp4ff_set_position(ff, ff->file_size);
+ mp4ff_write_int32(ff,new_moov_size + 8);
+- mp4ff_write_data(ff,"moov",4);
++ mp4ff_write_data(ff,(uint8_t*)"moov",4);
+ mp4ff_write_data(ff, new_moov_data, new_moov_size);
+ }
+ else
+ {
+ mp4ff_set_position(ff, ff->moov_offset);
+ mp4ff_write_int32(ff,new_moov_size + 8);
+- mp4ff_write_data(ff,"moov",4);
++ mp4ff_write_data(ff,(uint8_t*)"moov",4);
+ mp4ff_write_data(ff, new_moov_data, new_moov_size);
+ }
+
+diff -uNr faad2.orig/common/mp4ff/mp4util.c faad2/common/mp4ff/mp4util.c
+--- faad2.orig/common/mp4ff/mp4util.c 2004-01-11 16:52:19.000000000 +0100
++++ faad2/common/mp4ff/mp4util.c 2006-01-25 23:01:27.676811500 +0100
+@@ -28,7 +28,7 @@
+ #include "mp4ffint.h"
+ #include <stdlib.h>
+
+-int32_t mp4ff_read_data(mp4ff_t *f, int8_t *data, uint32_t size)
++int32_t mp4ff_read_data(mp4ff_t *f, uint8_t *data, uint32_t size)
+ {
+ int32_t result = 1;
+
+@@ -44,7 +44,7 @@
+ return f->stream->truncate(f->stream->user_data);
+ }
+
+-int32_t mp4ff_write_data(mp4ff_t *f, int8_t *data, uint32_t size)
++int32_t mp4ff_write_data(mp4ff_t *f, uint8_t *data, uint32_t size)
+ {
+ int32_t result = 1;
+
+@@ -105,13 +105,13 @@
+ {
+ uint32_t result;
+ uint32_t a, b, c, d;
+- int8_t data[4];
++ uint8_t data[4];
+
+ mp4ff_read_data(f, data, 4);
+- a = (uint8_t)data[0];
+- b = (uint8_t)data[1];
+- c = (uint8_t)data[2];
+- d = (uint8_t)data[3];
++ a = data[0];
++ b = data[1];
++ c = data[2];
++ d = data[3];
+
+ result = (a<<24) | (b<<16) | (c<<8) | d;
+ return (uint32_t)result;
+@@ -121,12 +121,12 @@
+ {
+ uint32_t result;
+ uint32_t a, b, c;
+- int8_t data[4];
++ uint8_t data[4];
+
+ mp4ff_read_data(f, data, 3);
+- a = (uint8_t)data[0];
+- b = (uint8_t)data[1];
+- c = (uint8_t)data[2];
++ a = data[0];
++ b = data[1];
++ c = data[2];
+
+ result = (a<<16) | (b<<8) | c;
+ return (uint32_t)result;
+@@ -136,11 +136,11 @@
+ {
+ uint32_t result;
+ uint32_t a, b;
+- int8_t data[2];
++ uint8_t data[2];
+
+ mp4ff_read_data(f, data, 2);
+- a = (uint8_t)data[0];
+- b = (uint8_t)data[1];
++ a = data[0];
++ b = data[1];
+
+ result = (a<<8) | b;
+ return (uint16_t)result;
+@@ -151,7 +151,7 @@
+ char * str = (char*)malloc(length + 1);
+ if (str!=0)
+ {
+- if ((uint32_t)mp4ff_read_data(f,str,length)!=length)
++ if ((uint32_t)mp4ff_read_data(f,(uint8_t*)str,length)!=length)
+ {
+ free(str);
+ str = 0;
+diff -uNr faad2.orig/common/mp4v2/mp4meta.cpp faad2/common/mp4v2/mp4meta.cpp
+--- faad2.orig/common/mp4v2/mp4meta.cpp 2003-08-03 14:17:20.000000000 +0200
++++ faad2/common/mp4v2/mp4meta.cpp 2006-01-25 23:01:27.680811750 +0100
+@@ -830,7 +830,6 @@
+ MP4BytesProperty *pMetadataProperty = NULL;
+ char s[256];
+ int i = 0;
+- bool nameExists = false;
+
+ while (1)
+ {
+diff -uNr faad2.orig/common/mp4v2/rtphint.h faad2/common/mp4v2/rtphint.h
+--- faad2.orig/common/mp4v2/rtphint.h 2003-06-29 23:41:00.000000000 +0200
++++ faad2/common/mp4v2/rtphint.h 2006-01-25 23:01:27.680811750 +0100
+@@ -35,8 +35,8 @@
+ return m_pPacket;
+ }
+
+- virtual u_int16_t GetDataSize() = NULL;
+- virtual void GetData(u_int8_t* pDest) = NULL;
++ virtual u_int16_t GetDataSize() = 0;
++ virtual void GetData(u_int8_t* pDest) = 0;
+
+ MP4Track* FindTrackFromRefIndex(u_int8_t refIndex);
+
+@@ -210,7 +210,7 @@
+
+ MP4RtpPacket* GetCurrentPacket() {
+ if (m_rtpPackets.Size() == 0) {
+- return NULL;
++ return 0;
+ }
+ return m_rtpPackets[m_rtpPackets.Size() - 1];
+ }
+@@ -250,10 +250,10 @@
+ }
+
+ void GetPayload(
+- char** ppPayloadName = NULL,
+- u_int8_t* pPayloadNumber = NULL,
+- u_int16_t* pMaxPayloadSize = NULL,
+- char **ppEncodingParams = NULL);
++ char** ppPayloadName = 0,
++ u_int8_t* pPayloadNumber = 0,
++ u_int16_t* pMaxPayloadSize = 0,
++ char **ppEncodingParams = 0);
+
+ void SetPayload(
+ const char* payloadName,
+@@ -265,7 +265,7 @@
+
+ void ReadHint(
+ MP4SampleId hintSampleId,
+- u_int16_t* pNumPackets = NULL);
++ u_int16_t* pNumPackets = 0);
+
+ u_int16_t GetHintNumberOfPackets();
+
+diff -uNr faad2.orig/frontend/main.c faad2/frontend/main.c
+--- faad2.orig/frontend/main.c 2004-01-06 12:59:47.000000000 +0100
++++ faad2/frontend/main.c 2006-01-25 23:01:27.680811750 +0100
+@@ -36,6 +36,7 @@
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <getopt.h>
+
+ #include <faad.h>
+@@ -377,8 +378,8 @@
+ float *song_length)
+ {
+ int tagsize;
+- unsigned long samplerate;
+- unsigned char channels;
++ uint32_t samplerate;
++ uint8_t channels;
+ void *sample_buffer;
+
+ audio_file *aufile;
+@@ -656,7 +657,7 @@
+ for (i = 0; i < numTracks; i++)
+ {
+ unsigned char *buff = NULL;
+- int buff_size = 0;
++ uint32_t buff_size = 0;
+ mp4AudioSpecificConfig mp4ASC;
+
+ mp4ff_get_decoder_config(infile, i, &buff, &buff_size);
+@@ -687,8 +688,8 @@
+ int infoOnly, int adts_out, float *song_length)
+ {
+ int track;
+- unsigned long samplerate;
+- unsigned char channels;
++ uint32_t samplerate;
++ uint8_t channels;
+ void *sample_buffer;
+
+ mp4ff_t *infile;
+@@ -707,7 +708,7 @@
+ mp4AudioSpecificConfig mp4ASC;
+
+ unsigned char *buffer;
+- int buffer_size;
++ uint32_t buffer_size;
+
+ char percents[200];
+ int percent, old_percent = -1;
+diff -uNr faad2.orig/include/faad.h faad2/include/faad.h
+--- faad2.orig/include/faad.h 2004-02-06 11:23:28.000000000 +0100
++++ faad2/include/faad.h 2006-01-25 23:11:10.341225750 +0100
+@@ -43,6 +43,10 @@
+ #endif
+ #endif
+
++/* needed for standard integer types */
++#define __STDC_LIMIT_MACROS
++#include <stdint.h>
++
+ #define FAAD2_VERSION "2.0 "
+
+ /* object types for AAC */
+@@ -112,86 +116,86 @@
+ typedef struct mp4AudioSpecificConfig
+ {
+ /* Audio Specific Info */
+- unsigned char objectTypeIndex;
+- unsigned char samplingFrequencyIndex;
+- unsigned long samplingFrequency;
+- unsigned char channelsConfiguration;
++ uint8_t objectTypeIndex;
++ uint8_t samplingFrequencyIndex;
++ uint32_t samplingFrequency;
++ uint8_t channelsConfiguration;
+
+ /* GA Specific Info */
+- unsigned char frameLengthFlag;
+- unsigned char dependsOnCoreCoder;
+- unsigned short coreCoderDelay;
+- unsigned char extensionFlag;
+- unsigned char aacSectionDataResilienceFlag;
+- unsigned char aacScalefactorDataResilienceFlag;
+- unsigned char aacSpectralDataResilienceFlag;
+- unsigned char epConfig;
++ uint8_t frameLengthFlag;
++ uint8_t dependsOnCoreCoder;
++ uint16_t coreCoderDelay;
++ uint8_t extensionFlag;
++ uint8_t aacSectionDataResilienceFlag;
++ uint8_t aacScalefactorDataResilienceFlag;
++ uint8_t aacSpectralDataResilienceFlag;
++ uint8_t epConfig;
+
+- char sbr_present_flag;
+- char forceUpSampling;
++ int8_t sbr_present_flag;
++ int8_t forceUpSampling;
+ } mp4AudioSpecificConfig;
+
+ typedef struct faacDecConfiguration
+ {
+- unsigned char defObjectType;
+- unsigned long defSampleRate;
+- unsigned char outputFormat;
+- unsigned char downMatrix;
+- unsigned char useOldADTSFormat;
+- unsigned char dontUpSampleImplicitSBR;
++ uint8_t defObjectType;
++ uint8_t defSampleRate;
++ uint8_t outputFormat;
++ uint8_t downMatrix;
++ uint8_t useOldADTSFormat;
++ uint8_t dontUpSampleImplicitSBR;
+ } faacDecConfiguration, *faacDecConfigurationPtr;
+
+ typedef struct faacDecFrameInfo
+ {
+- unsigned long bytesconsumed;
+- unsigned long samples;
+- unsigned char channels;
+- unsigned char error;
+- unsigned long samplerate;
++ uint32_t bytesconsumed;
++ uint32_t samples;
++ uint8_t channels;
++ uint8_t error;
++ uint32_t samplerate;
+
+ /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */
+- unsigned char sbr;
++ uint8_t sbr;
+
+ /* MPEG-4 ObjectType */
+- unsigned char object_type;
++ uint8_t object_type;
+
+ /* AAC header type; MP4 will be signalled as RAW also */
+- unsigned char header_type;
++ uint8_t header_type;
+
+ /* multichannel configuration */
+- unsigned char num_front_channels;
+- unsigned char num_side_channels;
+- unsigned char num_back_channels;
+- unsigned char num_lfe_channels;
+- unsigned char channel_position[64];
++ uint8_t num_front_channels;
++ uint8_t num_side_channels;
++ uint8_t num_back_channels;
++ uint8_t num_lfe_channels;
++ uint8_t channel_position[64];
+ } faacDecFrameInfo;
+
+-char* FAADAPI faacDecGetErrorMessage(unsigned char errcode);
++int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
+
+-unsigned long FAADAPI faacDecGetCapabilities(void);
++uint32_t FAADAPI faacDecGetCapabilities(void);
+
+ faacDecHandle FAADAPI faacDecOpen(void);
+
+ faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
+
+-unsigned char FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
++uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
+ faacDecConfigurationPtr config);
+
+ /* Init the library based on info from the AAC file (ADTS/ADIF) */
+ long FAADAPI faacDecInit(faacDecHandle hDecoder,
+- unsigned char *buffer,
+- unsigned long buffer_size,
+- unsigned long *samplerate,
+- unsigned char *channels);
++ uint8_t *buffer,
++ uint32_t buffer_size,
++ uint32_t *samplerate,
++ uint8_t *channels);
+
+ /* Init the library using a DecoderSpecificInfo */
+-char FAADAPI faacDecInit2(faacDecHandle hDecoder, unsigned char *pBuffer,
+- unsigned long SizeOfDecoderSpecificInfo,
+- unsigned long *samplerate, unsigned char *channels);
++int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer,
++ uint32_t SizeOfDecoderSpecificInfo,
++ uint32_t *samplerate, uint8_t *channels);
+
+ /* Init the library for DRM */
+-char FAADAPI faacDecInitDRM(faacDecHandle hDecoder, unsigned long samplerate,
+- unsigned char channels);
++int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
++ uint8_t channels);
+
+ void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, long frame);
+
+@@ -199,12 +203,12 @@
+
+ void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
+ faacDecFrameInfo *hInfo,
+- unsigned char *buffer,
+- unsigned long buffer_size);
++ uint8_t *buffer,
++ uint32_t buffer_size);
+
+-char FAADAPI AudioSpecificConfig(unsigned char *pBuffer,
+- unsigned long buffer_size,
+- mp4AudioSpecificConfig *mp4ASC);
++int8_t FAADAPI AudioSpecificConfig(uint8_t *pBuffer,
++ uint32_t buffer_size,
++ mp4AudioSpecificConfig *mp4ASC);
+
+ #ifdef _WIN32
+ #pragma pack(pop)
+diff -uNr faad2.orig/libfaad/common.h faad2/libfaad/common.h
+--- faad2.orig/libfaad/common.h 2004-02-06 13:55:24.000000000 +0100
++++ faad2/libfaad/common.h 2006-01-25 23:11:10.341225750 +0100
+@@ -197,8 +197,16 @@
+ #else
+ # if HAVE_STDINT_H
+ # include <stdint.h>
+-# else
+-/* we need these... */
++# elif defined(__x86_64__)
++typedef unsigned long uint64_t;
++typedef unsigned int uint32_t;
++typedef unsigned short uint16_t;
++typedef unsigned char uint8_t;
++typedef long int64_t;
++typedef int int32_t;
++typedef short int16_t;
++typedef char int8_t;
++#else
+ typedef unsigned long long uint64_t;
+ typedef unsigned long uint32_t;
+ typedef unsigned short uint16_t;
+diff -uNr faad2.orig/libfaad/decoder.c faad2/libfaad/decoder.c
+--- faad2.orig/libfaad/decoder.c 2004-02-04 21:07:24.000000000 +0100
++++ faad2/libfaad/decoder.c 2006-01-25 23:01:27.680811750 +0100
+@@ -50,7 +50,7 @@
+ uint16_t dbg_count;
+ #endif
+
+-int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode)
++char* FAADAPI faacDecGetErrorMessage(uint8_t errcode)
+ {
+ if (errcode >= NUM_ERROR_MESSAGES)
+ return NULL;
+diff -uNr faad2.orig/libfaad/decoder.h faad2/libfaad/decoder.h
+--- faad2.orig/libfaad/decoder.h 2004-01-05 15:05:11.000000000 +0100
++++ faad2/libfaad/decoder.h 2006-01-25 23:01:27.680811750 +0100
+@@ -76,7 +76,7 @@
+ #define LFE_CHANNEL (9)
+ #define UNKNOWN_CHANNEL (0)
+
+-int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
++char* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
+
+ uint32_t FAADAPI faacDecGetCapabilities(void);
+
+diff -uNr faad2.orig/libfaad/error.c faad2/libfaad/error.c
+--- faad2.orig/libfaad/error.c 2004-01-28 20:17:25.000000000 +0100
++++ faad2/libfaad/error.c 2006-01-25 23:01:27.680811750 +0100
+@@ -28,7 +28,7 @@
+ #include "common.h"
+ #include "error.h"
+
+-int8_t *err_msg[] = {
++char *err_msg[] = {
+ "No error",
+ "Gain control not yet implemented",
+ "Pulse coding not allowed in short blocks",
+diff -uNr faad2.orig/libfaad/error.h faad2/libfaad/error.h
+--- faad2.orig/libfaad/error.h 2004-01-28 20:17:25.000000000 +0100
++++ faad2/libfaad/error.h 2006-01-25 23:01:27.680811750 +0100
+@@ -33,7 +33,7 @@
+ #endif
+
+ #define NUM_ERROR_MESSAGES 26
+-extern int8_t *err_msg[];
++extern char *err_msg[];
+
+ #ifdef __cplusplus
+ }
+diff -uNr faad2.orig/plugins/mpeg4ip/aa_file.cpp faad2/plugins/mpeg4ip/aa_file.cpp
+--- faad2.orig/plugins/mpeg4ip/aa_file.cpp 2006-01-25 22:59:20.000000000 +0100
++++ faad2/plugins/mpeg4ip/aa_file.cpp 2006-01-25 23:11:10.341225750 +0100
+@@ -56,8 +56,8 @@
+ aac->m_buffer_size_max,
+ aac->m_ifile);
+
+- unsigned long freq;
+- unsigned char chans;
++ uint32_t freq;
++ uint8_t chans;
+
+ faacDecInit(aac->m_info, (unsigned char *)aac->m_buffer,
+ aac->m_buffer_size, &freq, &chans);
+diff -uNr faad2.orig/plugins/mpeg4ip/faad2.cpp faad2/plugins/mpeg4ip/faad2.cpp
+--- faad2.orig/plugins/mpeg4ip/faad2.cpp 2006-01-25 22:59:20.000000000 +0100
++++ faad2/plugins/mpeg4ip/faad2.cpp 2006-01-25 23:11:10.341225750 +0100
+@@ -78,8 +78,8 @@
+ }
+
+ 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,
+@@ -158,7 +158,7 @@
+ void *userdata)
+ {
+ aac_codec_t *aac = (aac_codec_t *)ptr;
+- unsigned long bytes_consummed;
++ uint32_t bytes_consummed;
+ int bits = -1;
+ // struct timezone tz;
+
+@@ -190,8 +190,8 @@
+ * 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,
+@@ -204,7 +204,7 @@
+ }
+
+ 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;
+diff -uNr faad2.orig/plugins/xmms/src/libmp4.c faad2/plugins/xmms/src/libmp4.c
+--- faad2.orig/plugins/xmms/src/libmp4.c 2006-01-25 22:59:20.000000000 +0100
++++ faad2/plugins/xmms/src/libmp4.c 2006-01-25 23:26:41.335409250 +0100
+@@ -22,6 +22,9 @@
+ #define MP4_ABOUT "Written by ciberfred"
+ #define BUFFER_SIZE FAAD_MIN_STREAMSIZE*64
+
++extern void getMP4info(char* file);
++extern int getAACTrack(MP4FileHandle file);
++
+ static void mp4_init(void);
+ static void mp4_about(void);
+ static void mp4_play(char *);
+@@ -203,7 +206,7 @@
+ faacDecHandle decoder;
+ unsigned char *buffer = NULL;
+ guint bufferSize = 0;
+- gulong samplerate;
++ guint samplerate;
+ guchar channels;
+ guint avgBitrate;
+ MP4Duration duration;
+@@ -331,7 +334,7 @@
+ faacDecHandle decoder = 0;
+ guchar *buffer = 0;
+ gulong bufferconsumed = 0;
+- gulong samplerate = 0;
++ guint samplerate = 0;
+ guchar channels;
+ gulong buffervalid = 0;
+ TitleInput* input;
+@@ -341,7 +344,7 @@
+ faacDecConfigurationPtr config;
+
+ if((file = fopen(args, "rb")) == 0){
+- g_print("AAC: can't find file %s\n", args);
++ g_print("AAC: can't find file %s\n", (char*)args);
+ bPlaying = FALSE;
+ pthread_mutex_unlock(&mutex);
+ pthread_exit(NULL);
+diff -uNr faad2.orig/plugins/xmms/src/mp4_utils.c faad2/plugins/xmms/src/mp4_utils.c
+--- faad2.orig/plugins/xmms/src/mp4_utils.c 2003-12-03 19:37:56.000000000 +0100
++++ faad2/plugins/xmms/src/mp4_utils.c 2006-01-25 23:27:58.284218250 +0100
+@@ -3,6 +3,7 @@
+ */
+ #include <mp4.h>
+ #include <faad.h>
++#include <glib.h>
+
+ const char *mp4AudioNames[]=
+ {
+@@ -54,7 +55,7 @@
+ const char *trackType = MP4GetTrackType(file, trackID);
+ if(!strcmp(trackType, MP4_AUDIO_TRACK_TYPE)){//we found audio track !
+ int j=0;
+- u_int8_t audiotype = MP4GetTrackAudioType(file, trackID);
++ u_int8_t audiotype = MP4GetTrackEsdsObjectTypeId(file, trackID);
+ while(mp4AudioTypes[j]){ // what kind of audio is ?
+ if(mp4AudioTypes[j] == audiotype){
+ if(mp4AudioTypes[j] == MP4_MPEG4_AUDIO_TYPE){//MPEG4 audio ok
+@@ -126,7 +127,7 @@
+ printf("Track %d, %s", trackID, trackType);
+ if(!strcmp(trackType, MP4_AUDIO_TRACK_TYPE)){//we found audio track !
+ int j=0;
+- u_int8_t audiotype = MP4GetTrackAudioType(mp4file, trackID);
++ u_int8_t audiotype = MP4GetTrackEsdsObjectTypeId(mp4file, trackID);
+ while(mp4AudioTypes[j]){ // what kind of audio is ?
+ if(mp4AudioTypes[j] == audiotype){
+ if(mp4AudioTypes[j] == MP4_MPEG4_AUDIO_TYPE){
+@@ -136,7 +137,7 @@
+ else{
+ printf(" %s", mp4AudioNames[j]);
+ }
+- g_print(" duration :%d",
++ g_print(" duration :%Zd",
+ MP4ConvertFromTrackDuration(mp4file, trackID,
+ MP4GetTrackDuration(mp4file,
+ trackID),