summaryrefslogtreecommitdiffstats
path: root/vlc/build/vlc-0.8.6a-faad2.patch
blob: 94a803c0f73ca8c3619fdd913c356fdc01b6d549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
diff -Naupr vlc-0.8.6a.orig/modules/codec/faad.c vlc-0.8.6a/modules/codec/faad.c
--- vlc-0.8.6a.orig/modules/codec/faad.c	2007-01-03 19:27:59.000000000 +0100
+++ vlc-0.8.6a/modules/codec/faad.c	2007-01-08 19:52:35.000000000 +0100
@@ -55,7 +55,7 @@ static void DoReordering( decoder_t *, u
 struct decoder_sys_t
 {
     /* faad handler */
-    faacDecHandle *hfaad;
+    NeAACDecHandle *hfaad;
 
     /* samples */
     audio_date_t date;
@@ -95,7 +95,7 @@ static int Open( vlc_object_t *p_this )
 {
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys = p_dec->p_sys;
-    faacDecConfiguration *cfg;
+    NeAACDecConfiguration *cfg;
 
     if( p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','4','a') )
     {
@@ -111,7 +111,7 @@ static int Open( vlc_object_t *p_this )
     }
 
     /* Open a faad context */
-    if( ( p_sys->hfaad = faacDecOpen() ) == NULL )
+    if( ( p_sys->hfaad = NeAACDecOpen() ) == NULL )
     {
         msg_Err( p_dec, "cannot initialize faad" );
         return VLC_EGENERIC;
@@ -136,7 +136,7 @@ static int Open( vlc_object_t *p_this )
         unsigned long i_rate;
         unsigned char i_channels;
 
-        if( faacDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra,
+        if( NeAACDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra,
                           p_dec->fmt_in.i_extra,
                           &i_rate, &i_channels ) < 0 )
         {
@@ -155,12 +155,12 @@ static int Open( vlc_object_t *p_this )
     }
 
     /* Set the faad config */
-    cfg = faacDecGetCurrentConfiguration( p_sys->hfaad );
+    cfg = NeAACDecGetCurrentConfiguration( p_sys->hfaad );
     if (p_this->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
         cfg->outputFormat = FAAD_FMT_FLOAT;
     else
         cfg->outputFormat = FAAD_FMT_16BIT;
-    faacDecSetConfiguration( p_sys->hfaad, cfg );
+    NeAACDecSetConfiguration( p_sys->hfaad, cfg );
 
     /* buffer */
     p_sys->i_buffer = p_sys->i_buffer_size = 0;
@@ -212,7 +212,7 @@ static aout_buffer_t *DecodeBlock( decod
         unsigned long i_rate;
         unsigned char i_channels;
 
-        if( faacDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra,
+        if( NeAACDecInit2( p_sys->hfaad, p_dec->fmt_in.p_extra,
                           p_dec->fmt_in.i_extra,
                           &i_rate, &i_channels ) >= 0 )
         {
@@ -228,7 +228,7 @@ static aout_buffer_t *DecodeBlock( decod
         unsigned char i_channels;
 
         /* Init faad with the first frame */
-        if( faacDecInit( p_sys->hfaad,
+        if( NeAACDecInit( p_sys->hfaad,
                          p_sys->p_buffer, p_sys->i_buffer,
                          &i_rate, &i_channels ) < 0 )
         {
@@ -257,16 +257,16 @@ static aout_buffer_t *DecodeBlock( decod
     if( p_sys->i_buffer )
     {
         void *samples;
-        faacDecFrameInfo frame;
+        NeAACDecFrameInfo frame;
         aout_buffer_t *p_out;
         int i, j;
 
-        samples = faacDecDecode( p_sys->hfaad, &frame,
+        samples = NeAACDecDecode( p_sys->hfaad, &frame,
                                  p_sys->p_buffer, p_sys->i_buffer );
 
         if( frame.error > 0 )
         {
-            msg_Warn( p_dec, "%s", faacDecGetErrorMessage( frame.error ) );
+            msg_Warn( p_dec, "%s", NeAACDecGetErrorMessage( frame.error ) );
 
             /* Flush the buffer */
             p_sys->i_buffer = 0;
@@ -403,7 +403,7 @@ static void Close( vlc_object_t *p_this 
     decoder_t *p_dec = (decoder_t *)p_this;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
-    faacDecClose( p_sys->hfaad );
+    NeAACDecClose( p_sys->hfaad );
     if( p_sys->p_buffer ) free( p_sys->p_buffer );
     free( p_sys );
 }