]> git.pld-linux.org Git - packages/faad2.git/blob - faad2-gcc4.patch
- more build fixes + 32/64-bit fixes for x86-64.
[packages/faad2.git] / faad2-gcc4.patch
1 diff -uNr faad2.orig/common/mp4ff/mp4atom.c faad2/common/mp4ff/mp4atom.c
2 --- faad2.orig/common/mp4ff/mp4atom.c   2004-01-11 16:52:18.000000000 +0100
3 +++ faad2/common/mp4ff/mp4atom.c        2006-01-25 23:01:27.676811500 +0100
4 @@ -31,15 +31,15 @@
5  #include "drms.h"
6  
7  /* parse atom header size */
8 -static int32_t mp4ff_atom_get_size(const int8_t *data)
9 +static int32_t mp4ff_atom_get_size(const uint8_t *data)
10  {
11      uint32_t result;
12      uint32_t a, b, c, d;
13  
14 -    a = (uint8_t)data[0];
15 -    b = (uint8_t)data[1];
16 -    c = (uint8_t)data[2];
17 -    d = (uint8_t)data[3];
18 +    a = data[0];
19 +    b = data[1];
20 +    c = data[2];
21 +    d = data[3];
22  
23      result = (a<<24) | (b<<16) | (c<<8) | d;
24      //if (result > 0 && result < 8) result = 8;
25 @@ -182,7 +182,7 @@
26  {
27      uint64_t size;
28      int32_t ret;
29 -    int8_t atom_header[8];
30 +    uint8_t atom_header[8];
31  
32      ret = mp4ff_read_data(f, atom_header, 8);
33      if (ret != 8)
34 diff -uNr faad2.orig/common/mp4ff/mp4ff.c faad2/common/mp4ff/mp4ff.c
35 --- faad2.orig/common/mp4ff/mp4ff.c     2004-01-11 16:52:18.000000000 +0100
36 +++ faad2/common/mp4ff/mp4ff.c  2006-01-25 23:01:35.581305500 +0100
37 @@ -87,7 +87,7 @@
38      if (ff) free(ff);
39  }
40  
41 -static void mp4ff_track_add(mp4ff_t *f)
42 +void mp4ff_track_add(mp4ff_t *f)
43  {
44      f->total_tracks++;
45  
46 diff -uNr faad2.orig/common/mp4ff/mp4ff.h faad2/common/mp4ff/mp4ff.h
47 --- faad2.orig/common/mp4ff/mp4ff.h     2006-01-25 22:59:20.000000000 +0100
48 +++ faad2/common/mp4ff/mp4ff.h  2006-01-25 23:01:27.676811500 +0100
49 @@ -129,4 +129,4 @@
50  }
51  #endif /* __cplusplus */
52  
53 -#endif
54 \ No newline at end of file
55 +#endif
56 diff -uNr faad2.orig/common/mp4ff/mp4ff_int_types.h faad2/common/mp4ff/mp4ff_int_types.h
57 --- faad2.orig/common/mp4ff/mp4ff_int_types.h   2003-12-13 23:26:56.000000000 +0100
58 +++ faad2/common/mp4ff/mp4ff_int_types.h        2006-01-25 23:01:27.676811500 +0100
59 @@ -20,4 +20,4 @@
60  #endif
61  
62  
63 -#endif
64 \ No newline at end of file
65 +#endif
66 diff -uNr faad2.orig/common/mp4ff/mp4ffint.h faad2/common/mp4ff/mp4ffint.h
67 --- faad2.orig/common/mp4ff/mp4ffint.h  2004-01-14 21:50:22.000000000 +0100
68 +++ faad2/common/mp4ff/mp4ffint.h       2006-01-25 23:01:27.676811500 +0100
69 @@ -226,8 +226,8 @@
70  
71  
72  /* mp4util.c */
73 -int32_t mp4ff_read_data(mp4ff_t *f, int8_t *data, uint32_t size);
74 -int32_t mp4ff_write_data(mp4ff_t *f, int8_t *data, uint32_t size);
75 +int32_t mp4ff_read_data(mp4ff_t *f, uint8_t *data, uint32_t size);
76 +int32_t mp4ff_write_data(mp4ff_t *f, uint8_t *data, uint32_t size);
77  uint64_t mp4ff_read_int64(mp4ff_t *f);
78  uint32_t mp4ff_read_int32(mp4ff_t *f);
79  uint32_t mp4ff_read_int24(mp4ff_t *f);
80 @@ -241,7 +241,7 @@
81  char * mp4ff_read_string(mp4ff_t * f,uint32_t length);
82  
83  /* mp4atom.c */
84 -static int32_t mp4ff_atom_get_size(const int8_t *data);
85 +static int32_t mp4ff_atom_get_size(const uint8_t *data);
86  static int32_t mp4ff_atom_compare(const int8_t a1, const int8_t b1, const int8_t c1, const int8_t d1,
87                                    const int8_t a2, const int8_t b2, const int8_t c2, const int8_t d2);
88  static uint8_t mp4ff_atom_name_to_type(const int8_t a, const int8_t b, const int8_t c, const int8_t d);
89 @@ -301,7 +301,6 @@
90  mp4ff_t *mp4ff_open_edit(mp4ff_callback_t *f);
91  #endif
92  void mp4ff_close(mp4ff_t *ff);
93 -void mp4ff_track_add(mp4ff_t *f);
94  int32_t parse_sub_atoms(mp4ff_t *f, const uint64_t total_size);
95  int32_t parse_atoms(mp4ff_t *f);
96  
97 @@ -326,4 +325,4 @@
98  }
99  #endif /* __cplusplus */
100  
101 -#endif
102 \ No newline at end of file
103 +#endif
104 diff -uNr faad2.orig/common/mp4ff/mp4meta.c faad2/common/mp4ff/mp4meta.c
105 --- faad2.orig/common/mp4ff/mp4meta.c   2004-01-11 16:52:18.000000000 +0100
106 +++ faad2/common/mp4ff/mp4meta.c        2006-01-25 23:01:27.676811500 +0100
107 @@ -411,4 +411,4 @@
108      return mp4ff_meta_find_by_name(f, "cover", value);
109  }
110  
111 -#endif
112 \ No newline at end of file
113 +#endif
114 diff -uNr faad2.orig/common/mp4ff/mp4tagupdate.c faad2/common/mp4ff/mp4tagupdate.c
115 --- faad2.orig/common/mp4ff/mp4tagupdate.c      2004-01-06 12:59:47.000000000 +0100
116 +++ faad2/common/mp4ff/mp4tagupdate.c   2006-01-25 23:01:27.676811500 +0100
117 @@ -143,7 +143,7 @@
118         bufptr = membuffer_get_ptr(buf);
119         if (bufptr==0) return 0;
120         
121 -       if ((unsigned)mp4ff_read_data(src,(char*)bufptr + oldsize,bytes)!=bytes)
122 +       if ((unsigned)mp4ff_read_data(src,(uint8_t*)bufptr + oldsize,bytes)!=bytes)
123         {
124                 membuffer_set_error(buf);
125                 return 0;
126 @@ -398,7 +398,7 @@
127         uint64_t atom_offset = base;
128         for(;;)
129         {
130 -               char atom_name[4];
131 +               uint8_t atom_name[4];
132                 uint32_t atom_size;
133  
134                 mp4ff_set_position(f,atom_offset);
135 @@ -618,7 +618,7 @@
136      /* copy moov atom to end of the file */
137      if (ff->last_atom != ATOM_MOOV)
138      {
139 -        char *free_data = "free";
140 +        uint8_t *free_data = (uint8_t*)"free";
141  
142          /* rename old moov to free */
143          mp4ff_set_position(ff, ff->moov_offset + 4);
144 @@ -626,14 +626,14 @@
145         
146          mp4ff_set_position(ff, ff->file_size);
147                 mp4ff_write_int32(ff,new_moov_size + 8);
148 -               mp4ff_write_data(ff,"moov",4);
149 +               mp4ff_write_data(ff,(uint8_t*)"moov",4);
150                 mp4ff_write_data(ff, new_moov_data, new_moov_size);
151      }
152         else
153         {
154          mp4ff_set_position(ff, ff->moov_offset);
155                 mp4ff_write_int32(ff,new_moov_size + 8);
156 -               mp4ff_write_data(ff,"moov",4);
157 +               mp4ff_write_data(ff,(uint8_t*)"moov",4);
158                 mp4ff_write_data(ff, new_moov_data, new_moov_size);
159         }
160  
161 diff -uNr faad2.orig/common/mp4ff/mp4util.c faad2/common/mp4ff/mp4util.c
162 --- faad2.orig/common/mp4ff/mp4util.c   2004-01-11 16:52:19.000000000 +0100
163 +++ faad2/common/mp4ff/mp4util.c        2006-01-25 23:01:27.676811500 +0100
164 @@ -28,7 +28,7 @@
165  #include "mp4ffint.h"
166  #include <stdlib.h>
167  
168 -int32_t mp4ff_read_data(mp4ff_t *f, int8_t *data, uint32_t size)
169 +int32_t mp4ff_read_data(mp4ff_t *f, uint8_t *data, uint32_t size)
170  {
171      int32_t result = 1;
172  
173 @@ -44,7 +44,7 @@
174         return f->stream->truncate(f->stream->user_data);
175  }
176  
177 -int32_t mp4ff_write_data(mp4ff_t *f, int8_t *data, uint32_t size)
178 +int32_t mp4ff_write_data(mp4ff_t *f, uint8_t *data, uint32_t size)
179  {
180      int32_t result = 1;
181  
182 @@ -105,13 +105,13 @@
183  {
184      uint32_t result;
185      uint32_t a, b, c, d;
186 -    int8_t data[4];
187 +    uint8_t data[4];
188      
189      mp4ff_read_data(f, data, 4);
190 -    a = (uint8_t)data[0];
191 -    b = (uint8_t)data[1];
192 -    c = (uint8_t)data[2];
193 -    d = (uint8_t)data[3];
194 +    a = data[0];
195 +    b = data[1];
196 +    c = data[2];
197 +    d = data[3];
198  
199      result = (a<<24) | (b<<16) | (c<<8) | d;
200      return (uint32_t)result;
201 @@ -121,12 +121,12 @@
202  {
203      uint32_t result;
204      uint32_t a, b, c;
205 -    int8_t data[4];
206 +    uint8_t data[4];
207      
208      mp4ff_read_data(f, data, 3);
209 -    a = (uint8_t)data[0];
210 -    b = (uint8_t)data[1];
211 -    c = (uint8_t)data[2];
212 +    a = data[0];
213 +    b = data[1];
214 +    c = data[2];
215  
216      result = (a<<16) | (b<<8) | c;
217      return (uint32_t)result;
218 @@ -136,11 +136,11 @@
219  {
220      uint32_t result;
221      uint32_t a, b;
222 -    int8_t data[2];
223 +    uint8_t data[2];
224      
225      mp4ff_read_data(f, data, 2);
226 -    a = (uint8_t)data[0];
227 -    b = (uint8_t)data[1];
228 +    a = data[0];
229 +    b = data[1];
230  
231      result = (a<<8) | b;
232      return (uint16_t)result;
233 @@ -151,7 +151,7 @@
234         char * str = (char*)malloc(length + 1);
235         if (str!=0)
236         {
237 -               if ((uint32_t)mp4ff_read_data(f,str,length)!=length)
238 +               if ((uint32_t)mp4ff_read_data(f,(uint8_t*)str,length)!=length)
239                 {
240                         free(str);
241                         str = 0;
242 diff -uNr faad2.orig/common/mp4v2/mp4meta.cpp faad2/common/mp4v2/mp4meta.cpp
243 --- faad2.orig/common/mp4v2/mp4meta.cpp 2003-08-03 14:17:20.000000000 +0200
244 +++ faad2/common/mp4v2/mp4meta.cpp      2006-01-25 23:01:27.680811750 +0100
245 @@ -830,7 +830,6 @@
246      MP4BytesProperty *pMetadataProperty = NULL;
247      char s[256];
248      int i = 0;
249 -    bool nameExists = false;
250  
251      while (1)
252      {
253 diff -uNr faad2.orig/common/mp4v2/rtphint.h faad2/common/mp4v2/rtphint.h
254 --- faad2.orig/common/mp4v2/rtphint.h   2003-06-29 23:41:00.000000000 +0200
255 +++ faad2/common/mp4v2/rtphint.h        2006-01-25 23:01:27.680811750 +0100
256 @@ -35,8 +35,8 @@
257                 return m_pPacket;
258         }
259  
260 -       virtual u_int16_t GetDataSize() = NULL;
261 -       virtual void GetData(u_int8_t* pDest) = NULL;
262 +       virtual u_int16_t GetDataSize() = 0;
263 +       virtual void GetData(u_int8_t* pDest) = 0;
264  
265         MP4Track* FindTrackFromRefIndex(u_int8_t refIndex);
266  
267 @@ -210,7 +210,7 @@
268  
269         MP4RtpPacket* GetCurrentPacket() {
270                 if (m_rtpPackets.Size() == 0) {
271 -                       return NULL;
272 +                       return 0;
273                 }
274                 return m_rtpPackets[m_rtpPackets.Size() - 1];
275         }
276 @@ -250,10 +250,10 @@
277         }
278  
279         void GetPayload(
280 -               char** ppPayloadName = NULL,
281 -               u_int8_t* pPayloadNumber = NULL,
282 -               u_int16_t* pMaxPayloadSize = NULL,
283 -               char **ppEncodingParams = NULL);
284 +               char** ppPayloadName = 0,
285 +               u_int8_t* pPayloadNumber = 0,
286 +               u_int16_t* pMaxPayloadSize = 0,
287 +               char **ppEncodingParams = 0);
288  
289         void SetPayload(
290                 const char* payloadName,
291 @@ -265,7 +265,7 @@
292  
293         void ReadHint(
294                 MP4SampleId hintSampleId,
295 -               u_int16_t* pNumPackets = NULL);
296 +               u_int16_t* pNumPackets = 0);
297  
298         u_int16_t GetHintNumberOfPackets();
299  
300 diff -uNr faad2.orig/frontend/main.c faad2/frontend/main.c
301 --- faad2.orig/frontend/main.c  2004-01-06 12:59:47.000000000 +0100
302 +++ faad2/frontend/main.c       2006-01-25 23:01:27.680811750 +0100
303 @@ -36,6 +36,7 @@
304  #include <fcntl.h>
305  #include <stdio.h>
306  #include <stdlib.h>
307 +#include <string.h>
308  #include <getopt.h>
309  
310  #include <faad.h>
311 @@ -377,8 +378,8 @@
312                    float *song_length)
313  {
314      int tagsize;
315 -    unsigned long samplerate;
316 -    unsigned char channels;
317 +    uint32_t samplerate;
318 +    uint8_t channels;
319      void *sample_buffer;
320  
321      audio_file *aufile;
322 @@ -656,7 +657,7 @@
323      for (i = 0; i < numTracks; i++)
324      {
325          unsigned char *buff = NULL;
326 -        int buff_size = 0;
327 +        uint32_t buff_size = 0;
328          mp4AudioSpecificConfig mp4ASC;
329  
330          mp4ff_get_decoder_config(infile, i, &buff, &buff_size);
331 @@ -687,8 +688,8 @@
332                    int infoOnly, int adts_out, float *song_length)
333  {
334      int track;
335 -    unsigned long samplerate;
336 -    unsigned char channels;
337 +    uint32_t samplerate;
338 +    uint8_t channels;
339      void *sample_buffer;
340  
341      mp4ff_t *infile;
342 @@ -707,7 +708,7 @@
343      mp4AudioSpecificConfig mp4ASC;
344  
345      unsigned char *buffer;
346 -    int buffer_size;
347 +    uint32_t buffer_size;
348  
349      char percents[200];
350      int percent, old_percent = -1;
351 diff -uNr faad2.orig/include/faad.h faad2/include/faad.h
352 --- faad2.orig/include/faad.h   2004-02-06 11:23:28.000000000 +0100
353 +++ faad2/include/faad.h        2006-01-25 23:11:10.341225750 +0100
354 @@ -43,6 +43,10 @@
355    #endif
356  #endif
357  
358 +/* needed for standard integer types */
359 +#define __STDC_LIMIT_MACROS
360 +#include <stdint.h>
361 +
362  #define FAAD2_VERSION "2.0     "
363  
364  /* object types for AAC */
365 @@ -112,86 +116,86 @@
366  typedef struct mp4AudioSpecificConfig
367  {
368      /* Audio Specific Info */
369 -    unsigned char objectTypeIndex;
370 -    unsigned char samplingFrequencyIndex;
371 -    unsigned long samplingFrequency;
372 -    unsigned char channelsConfiguration;
373 +    uint8_t objectTypeIndex;
374 +    uint8_t samplingFrequencyIndex;
375 +    uint32_t samplingFrequency;
376 +    uint8_t channelsConfiguration;
377  
378      /* GA Specific Info */
379 -    unsigned char frameLengthFlag;
380 -    unsigned char dependsOnCoreCoder;
381 -    unsigned short coreCoderDelay;
382 -    unsigned char extensionFlag;
383 -    unsigned char aacSectionDataResilienceFlag;
384 -    unsigned char aacScalefactorDataResilienceFlag;
385 -    unsigned char aacSpectralDataResilienceFlag;
386 -    unsigned char epConfig;
387 +    uint8_t frameLengthFlag;
388 +    uint8_t dependsOnCoreCoder;
389 +    uint16_t coreCoderDelay;
390 +    uint8_t extensionFlag;
391 +    uint8_t aacSectionDataResilienceFlag;
392 +    uint8_t aacScalefactorDataResilienceFlag;
393 +    uint8_t aacSpectralDataResilienceFlag;
394 +    uint8_t epConfig;
395  
396 -    char sbr_present_flag;
397 -    char forceUpSampling;
398 +    int8_t sbr_present_flag;
399 +    int8_t forceUpSampling;
400  } mp4AudioSpecificConfig;
401  
402  typedef struct faacDecConfiguration
403  {
404 -    unsigned char defObjectType;
405 -    unsigned long defSampleRate;
406 -    unsigned char outputFormat;
407 -    unsigned char downMatrix;
408 -    unsigned char useOldADTSFormat;
409 -    unsigned char dontUpSampleImplicitSBR;
410 +    uint8_t defObjectType;
411 +    uint8_t defSampleRate;
412 +    uint8_t outputFormat;
413 +    uint8_t downMatrix;
414 +    uint8_t useOldADTSFormat;
415 +    uint8_t dontUpSampleImplicitSBR;
416  } faacDecConfiguration, *faacDecConfigurationPtr;
417  
418  typedef struct faacDecFrameInfo
419  {
420 -    unsigned long bytesconsumed;
421 -    unsigned long samples;
422 -    unsigned char channels;
423 -    unsigned char error;
424 -    unsigned long samplerate;
425 +    uint32_t bytesconsumed;
426 +    uint32_t samples;
427 +    uint8_t channels;
428 +    uint8_t error;
429 +    uint32_t samplerate;
430  
431      /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */
432 -    unsigned char sbr;
433 +    uint8_t sbr;
434  
435      /* MPEG-4 ObjectType */
436 -    unsigned char object_type;
437 +    uint8_t object_type;
438  
439      /* AAC header type; MP4 will be signalled as RAW also */
440 -    unsigned char header_type;
441 +    uint8_t header_type;
442  
443      /* multichannel configuration */
444 -    unsigned char num_front_channels;
445 -    unsigned char num_side_channels;
446 -    unsigned char num_back_channels;
447 -    unsigned char num_lfe_channels;
448 -    unsigned char channel_position[64];
449 +    uint8_t num_front_channels;
450 +    uint8_t num_side_channels;
451 +    uint8_t num_back_channels;
452 +    uint8_t num_lfe_channels;
453 +    uint8_t channel_position[64];
454  } faacDecFrameInfo;
455  
456 -char* FAADAPI faacDecGetErrorMessage(unsigned char errcode);
457 +int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
458  
459 -unsigned long FAADAPI faacDecGetCapabilities(void);
460 +uint32_t FAADAPI faacDecGetCapabilities(void);
461  
462  faacDecHandle FAADAPI faacDecOpen(void);
463  
464  faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
465  
466 -unsigned char FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
467 +uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
468                                      faacDecConfigurationPtr config);
469  
470  /* Init the library based on info from the AAC file (ADTS/ADIF) */
471  long FAADAPI faacDecInit(faacDecHandle hDecoder,
472 -                        unsigned char *buffer,
473 -                        unsigned long buffer_size,
474 -                        unsigned long *samplerate,
475 -                        unsigned char *channels);
476 +                         uint8_t *buffer,
477 +                         uint32_t buffer_size,
478 +                         uint32_t *samplerate,
479 +                         uint8_t *channels);
480  
481  /* Init the library using a DecoderSpecificInfo */
482 -char FAADAPI faacDecInit2(faacDecHandle hDecoder, unsigned char *pBuffer,
483 -                         unsigned long SizeOfDecoderSpecificInfo,
484 -                         unsigned long *samplerate, unsigned char *channels);
485 +int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer,
486 +                            uint32_t SizeOfDecoderSpecificInfo,
487 +                            uint32_t *samplerate, uint8_t *channels);
488  
489  /* Init the library for DRM */
490 -char FAADAPI faacDecInitDRM(faacDecHandle hDecoder, unsigned long samplerate,
491 -                            unsigned char channels);
492 +int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
493 +                              uint8_t channels);
494  
495  void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, long frame);
496  
497 @@ -199,12 +203,12 @@
498  
499  void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
500                              faacDecFrameInfo *hInfo,
501 -                            unsigned char *buffer,
502 -                            unsigned long buffer_size);
503 +                            uint8_t *buffer,
504 +                            uint32_t buffer_size);
505  
506 -char FAADAPI AudioSpecificConfig(unsigned char *pBuffer,
507 -                                 unsigned long buffer_size,
508 -                                 mp4AudioSpecificConfig *mp4ASC);
509 +int8_t FAADAPI AudioSpecificConfig(uint8_t *pBuffer,
510 +                                   uint32_t buffer_size,
511 +                                   mp4AudioSpecificConfig *mp4ASC);
512  
513  #ifdef _WIN32
514    #pragma pack(pop)
515 diff -uNr faad2.orig/libfaad/common.h faad2/libfaad/common.h
516 --- faad2.orig/libfaad/common.h 2004-02-06 13:55:24.000000000 +0100
517 +++ faad2/libfaad/common.h      2006-01-25 23:11:10.341225750 +0100
518 @@ -197,8 +197,16 @@
519  #else
520  # if HAVE_STDINT_H
521  #  include <stdint.h>
522 -# else
523 -/* we need these... */
524 +# elif defined(__x86_64__)
525 +typedef unsigned long uint64_t;
526 +typedef unsigned int uint32_t;
527 +typedef unsigned short uint16_t;
528 +typedef unsigned char uint8_t;
529 +typedef long int64_t;
530 +typedef int int32_t;
531 +typedef short int16_t;
532 +typedef char int8_t;
533 +#else
534  typedef unsigned long long uint64_t;
535  typedef unsigned long uint32_t;
536  typedef unsigned short uint16_t;
537 diff -uNr faad2.orig/libfaad/decoder.c faad2/libfaad/decoder.c
538 --- faad2.orig/libfaad/decoder.c        2004-02-04 21:07:24.000000000 +0100
539 +++ faad2/libfaad/decoder.c     2006-01-25 23:01:27.680811750 +0100
540 @@ -50,7 +50,7 @@
541  uint16_t dbg_count;
542  #endif
543  
544 -int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode)
545 +char* FAADAPI faacDecGetErrorMessage(uint8_t errcode)
546  {
547      if (errcode >= NUM_ERROR_MESSAGES)
548          return NULL;
549 diff -uNr faad2.orig/libfaad/decoder.h faad2/libfaad/decoder.h
550 --- faad2.orig/libfaad/decoder.h        2004-01-05 15:05:11.000000000 +0100
551 +++ faad2/libfaad/decoder.h     2006-01-25 23:01:27.680811750 +0100
552 @@ -76,7 +76,7 @@
553  #define LFE_CHANNEL          (9)
554  #define UNKNOWN_CHANNEL      (0)
555  
556 -int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
557 +char* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
558  
559  uint32_t FAADAPI faacDecGetCapabilities(void);
560  
561 diff -uNr faad2.orig/libfaad/error.c faad2/libfaad/error.c
562 --- faad2.orig/libfaad/error.c  2004-01-28 20:17:25.000000000 +0100
563 +++ faad2/libfaad/error.c       2006-01-25 23:01:27.680811750 +0100
564 @@ -28,7 +28,7 @@
565  #include "common.h"
566  #include "error.h"
567  
568 -int8_t *err_msg[] = {
569 +char *err_msg[] = {
570      "No error",
571      "Gain control not yet implemented",
572      "Pulse coding not allowed in short blocks",
573 diff -uNr faad2.orig/libfaad/error.h faad2/libfaad/error.h
574 --- faad2.orig/libfaad/error.h  2004-01-28 20:17:25.000000000 +0100
575 +++ faad2/libfaad/error.h       2006-01-25 23:01:27.680811750 +0100
576 @@ -33,7 +33,7 @@
577  #endif
578  
579  #define NUM_ERROR_MESSAGES 26
580 -extern int8_t *err_msg[];
581 +extern char *err_msg[];
582  
583  #ifdef __cplusplus
584  }
585 diff -uNr faad2.orig/plugins/mpeg4ip/aa_file.cpp faad2/plugins/mpeg4ip/aa_file.cpp
586 --- faad2.orig/plugins/mpeg4ip/aa_file.cpp      2006-01-25 22:59:20.000000000 +0100
587 +++ faad2/plugins/mpeg4ip/aa_file.cpp   2006-01-25 23:11:10.341225750 +0100
588 @@ -56,8 +56,8 @@
589                   aac->m_buffer_size_max,
590                   aac->m_ifile);
591  
592 -  unsigned long freq;
593 -  unsigned char chans;
594 +  uint32_t freq;
595 +  uint8_t chans;
596  
597    faacDecInit(aac->m_info, (unsigned char *)aac->m_buffer,
598            aac->m_buffer_size, &freq, &chans);
599 diff -uNr faad2.orig/plugins/mpeg4ip/faad2.cpp faad2/plugins/mpeg4ip/faad2.cpp
600 --- faad2.orig/plugins/mpeg4ip/faad2.cpp        2006-01-25 22:59:20.000000000 +0100
601 +++ faad2/plugins/mpeg4ip/faad2.cpp     2006-01-25 23:11:10.341225750 +0100
602 @@ -78,8 +78,8 @@
603    }
604  
605    aac->m_info = faacDecOpen();
606 -  unsigned long srate;
607 -  unsigned char chan;
608 +  uint32_t srate;
609 +  uint8_t chan;
610    if ((userdata == NULL && fmtp == NULL) ||
611        (faacDecInit2(aac->m_info,
612               (uint8_t *)userdata,
613 @@ -158,7 +158,7 @@
614                 void *userdata)
615  {
616    aac_codec_t *aac = (aac_codec_t *)ptr;
617 -  unsigned long bytes_consummed;
618 +  uint32_t bytes_consummed;
619    int bits = -1;
620    //  struct timezone tz;
621  
622 @@ -190,8 +190,8 @@
623       * If not initialized, do so.
624       */
625      abort();
626 -    unsigned long freq;
627 -    unsigned char chans;
628 +    uint32_t freq;
629 +    uint8_t chans;
630  
631      faacDecInit(aac->m_info,
632          (unsigned char *)buffer,
633 @@ -204,7 +204,7 @@
634    }
635  
636    uint8_t *buff;
637 -  unsigned long samples;
638 +  uint32_t samples;
639    bytes_consummed = buflen;
640    //aa_message(LOG_DEBUG, aaclib, "decoding %d bits", buflen * 8);
641    faacDecFrameInfo frame_info;
642 diff -uNr faad2.orig/plugins/xmms/src/libmp4.c faad2/plugins/xmms/src/libmp4.c
643 --- faad2.orig/plugins/xmms/src/libmp4.c        2006-01-25 22:59:20.000000000 +0100
644 +++ faad2/plugins/xmms/src/libmp4.c     2006-01-25 23:26:41.335409250 +0100
645 @@ -22,6 +22,9 @@
646  #define MP4_ABOUT      "Written by ciberfred"
647  #define BUFFER_SIZE    FAAD_MIN_STREAMSIZE*64
648  
649 +extern void     getMP4info(char* file);
650 +extern int      getAACTrack(MP4FileHandle file);
651 +
652  static void    mp4_init(void);
653  static void    mp4_about(void);
654  static void    mp4_play(char *);
655 @@ -203,7 +206,7 @@
656        faacDecHandle    decoder;
657        unsigned char    *buffer = NULL;
658        guint            bufferSize = 0;
659 -      gulong           samplerate;
660 +      guint            samplerate;
661        guchar           channels;
662        guint            avgBitrate;
663        MP4Duration      duration;
664 @@ -331,7 +334,7 @@
665      faacDecHandle      decoder = 0;
666      guchar             *buffer = 0;
667      gulong             bufferconsumed = 0;
668 -    gulong             samplerate = 0;
669 +    guint              samplerate = 0;
670      guchar             channels;
671      gulong             buffervalid = 0;
672      TitleInput*                input;
673 @@ -341,7 +344,7 @@
674      faacDecConfigurationPtr config;
675  
676      if((file = fopen(args, "rb")) == 0){
677 -      g_print("AAC: can't find file %s\n", args);
678 +      g_print("AAC: can't find file %s\n", (char*)args);
679        bPlaying = FALSE;
680        pthread_mutex_unlock(&mutex);
681        pthread_exit(NULL);
682 diff -uNr faad2.orig/plugins/xmms/src/mp4_utils.c faad2/plugins/xmms/src/mp4_utils.c
683 --- faad2.orig/plugins/xmms/src/mp4_utils.c     2003-12-03 19:37:56.000000000 +0100
684 +++ faad2/plugins/xmms/src/mp4_utils.c  2006-01-25 23:27:58.284218250 +0100
685 @@ -3,6 +3,7 @@
686  */
687  #include <mp4.h>
688  #include <faad.h>
689 +#include <glib.h>
690  
691  const char *mp4AudioNames[]=
692    {
693 @@ -54,7 +55,7 @@
694      const char *trackType = MP4GetTrackType(file, trackID);
695      if(!strcmp(trackType, MP4_AUDIO_TRACK_TYPE)){//we found audio track !
696        int j=0;
697 -      u_int8_t audiotype = MP4GetTrackAudioType(file, trackID);
698 +      u_int8_t audiotype = MP4GetTrackEsdsObjectTypeId(file, trackID);
699        while(mp4AudioTypes[j]){ // what kind of audio is ?
700         if(mp4AudioTypes[j] == audiotype){
701           if(mp4AudioTypes[j] == MP4_MPEG4_AUDIO_TYPE){//MPEG4 audio ok
702 @@ -126,7 +127,7 @@
703      printf("Track %d, %s", trackID, trackType);
704      if(!strcmp(trackType, MP4_AUDIO_TRACK_TYPE)){//we found audio track !
705        int j=0;
706 -      u_int8_t audiotype = MP4GetTrackAudioType(mp4file, trackID);
707 +      u_int8_t audiotype = MP4GetTrackEsdsObjectTypeId(mp4file, trackID);
708        while(mp4AudioTypes[j]){ // what kind of audio is ?
709         if(mp4AudioTypes[j] == audiotype){
710           if(mp4AudioTypes[j] == MP4_MPEG4_AUDIO_TYPE){
711 @@ -136,7 +137,7 @@
712           else{
713             printf(" %s", mp4AudioNames[j]);
714           }
715 -         g_print(" duration :%d",
716 +         g_print(" duration :%Zd",
717                  MP4ConvertFromTrackDuration(mp4file, trackID,
718                                              MP4GetTrackDuration(mp4file,
719                                                                  trackID),
This page took 0.164681 seconds and 3 git commands to generate.