The patch attached below fixes the problem for me.  It looks biggish,
but it's quite simple, actually: it adds to decoder.h forward
declarations for structures NeAACDec, NeAACDecConfiguration, and
NeAACDecFrameInfo and then uses pointers to them in lieu of
NeAACDecHandle, NeAACDecConfigurationPtr, and NeAACDecFrameInfo.  With
these changes, decoder.h can be included in xine_decoder.c and the
problematic implicit declarations are taken care of.  It's not the
most elegant patch, but it's the best I was able to come up with that
doesn't require major surgery.

 --david
--
Mosberger Consulting LLC, http://www.mosberger-consulting.com/
diff -u xine-lib-1.1.1/src/libfaad/decoder.h xine-lib-1.1.1-fixed/src/libfaad/decoder.h
--- xine-lib-1.1.1/src/libfaad/decoder.h	2005-10-29 16:57:06.000000000 -0700
+++ xine-lib-1.1.1-fixed/src/libfaad/decoder.h	2006-06-16 08:20:30.000000000 -0700
@@ -74,40 +74,44 @@
 
 uint32_t NEAACDECAPI NeAACDecGetCapabilities(void);
 
-NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
+struct NeAACDec;
+struct NeAACDecConfiguration;
+struct NeAACDecFrameInfo;
 
-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
+struct NeAACDec NEAACDECAPI *NeAACDecOpen(void);
 
-uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
-                                             NeAACDecConfigurationPtr config);
+struct NeAACDecConfiguration NEAACDECAPI *NeAACDecGetCurrentConfiguration(struct NeAACDec * hDecoder);
+
+uint8_t NEAACDECAPI NeAACDecSetConfiguration(struct NeAACDec * hDecoder,
+                                             struct NeAACDecConfiguration *config);
 
 /* Init the library based on info from the AAC file (ADTS/ADIF) */
-int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
+int32_t NEAACDECAPI NeAACDecInit(struct NeAACDec * hDecoder,
                                  uint8_t *buffer,
                                  uint32_t buffer_size,
                                  uint32_t *samplerate,
                                  uint8_t *channels);
 
 /* Init the library using a DecoderSpecificInfo */
-int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
+int8_t NEAACDECAPI NeAACDecInit2(struct NeAACDec * hDecoder, uint8_t *pBuffer,
                                  uint32_t SizeOfDecoderSpecificInfo,
                                  uint32_t *samplerate, uint8_t *channels);
 
 /* Init the library for DRM */
-int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
+int8_t NEAACDECAPI NeAACDecInitDRM(struct NeAACDec * *hDecoder, uint32_t samplerate,
                                    uint8_t channels);
 
-void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
+void NEAACDECAPI NeAACDecClose(struct NeAACDec * hDecoder);
 
-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame);
+void NEAACDECAPI NeAACDecPostSeekReset(struct NeAACDec * hDecoder, int32_t frame);
 
-void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
-                                 NeAACDecFrameInfo *hInfo,
+void* NEAACDECAPI NeAACDecDecode(struct NeAACDec * hDecoder,
+                                 struct NeAACDecFrameInfo *hInfo,
                                  uint8_t *buffer,
                                  uint32_t buffer_size);
 
-void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
-                                  NeAACDecFrameInfo *hInfo,
+void* NEAACDECAPI NeAACDecDecode2(struct NeAACDec * hDecoder,
+                                  struct NeAACDecFrameInfo *hInfo,
                                   uint8_t *buffer, uint32_t buffer_size,
                                   void **sample_buffer, uint32_t sample_buffer_size);
 
diff -u xine-lib-1.1.1/src/libfaad/structs.h xine-lib-1.1.1-fixed/src/libfaad/structs.h
--- xine-lib-1.1.1/src/libfaad/structs.h	2005-10-29 16:57:07.000000000 -0700
+++ xine-lib-1.1.1-fixed/src/libfaad/structs.h	2006-06-16 07:59:27.000000000 -0700
@@ -368,7 +368,7 @@
     /*uint8_t*/ unsigned char ps;
 } NeAACDecFrameInfo;
 
-typedef struct
+typedef struct NeAACDec
 {
     uint8_t adts_header_present;
     uint8_t adif_header_present;
diff -u xine-lib-1.1.1/src/libfaad/xine_decoder.c xine-lib-1.1.1-fixed/src/libfaad/xine_decoder.c
--- xine-lib-1.1.1/src/libfaad/xine_decoder.c	2005-10-29 16:57:07.000000000 -0700
+++ xine-lib-1.1.1-fixed/src/libfaad/xine_decoder.c	2006-06-16 08:24:40.000000000 -0700
@@ -40,6 +40,9 @@
 #include "xineutils.h"
 #include "faad.h"
 
+
+#include "decoder.h"
+
 typedef struct {
   audio_decoder_class_t   decoder_class;
 } faad_class_t;

Reply via email to