summaryrefslogtreecommitdiffstats
path: root/vlc/build/ffmpeg-faac.patch
blob: eb6eef884bef8b1d29ca34bc3ddde33710cec2b4 (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
--- faac.c.orig	2007-02-28 10:56:15.000000000 +0100
+++ faac.c	2007-03-16 03:14:30.000000000 +0100
@@ -28,28 +28,28 @@
 #include <faac.h>
 
 typedef struct FaacAudioContext {
-    faacEncHandle faac_handle;
+    NeAACEncHandle faac_handle;
 } FaacAudioContext;
 
 static int Faac_encode_init(AVCodecContext *avctx)
 {
     FaacAudioContext *s = avctx->priv_data;
-    faacEncConfigurationPtr faac_cfg;
+    NeAACEncConfigurationPtr faac_cfg;
     unsigned long samples_input, max_bytes_output;
 
     /* number of channels */
     if (avctx->channels < 1 || avctx->channels > 6)
         return -1;
 
-    s->faac_handle = faacEncOpen(avctx->sample_rate,
+    s->faac_handle = NeAACEncOpen(avctx->sample_rate,
                                  avctx->channels,
                                  &samples_input, &max_bytes_output);
 
     /* check faac version */
-    faac_cfg = faacEncGetCurrentConfiguration(s->faac_handle);
+    faac_cfg = NeAACEncGetCurrentConfiguration(s->faac_handle);
     if (faac_cfg->version != FAAC_CFG_VERSION) {
         av_log(avctx, AV_LOG_ERROR, "wrong libfaac version (compiled for: %d, using %d)\n", FAAC_CFG_VERSION, faac_cfg->version);
-        faacEncClose(s->faac_handle);
+        NeAACEncClose(s->faac_handle);
         return -1;
     }
 
@@ -79,7 +79,7 @@
         unsigned char *buffer = NULL;
         unsigned long decoder_specific_info_size;
 
-        if (!faacEncGetDecoderSpecificInfo(s->faac_handle, &buffer,
+        if (!NeAACEncGetDecoderSpecificInfo(s->faac_handle, &buffer,
                                            &decoder_specific_info_size)) {
             avctx->extradata = av_malloc(decoder_specific_info_size + FF_INPUT_BUFFER_PADDING_SIZE);
             avctx->extradata_size = decoder_specific_info_size;
@@ -91,7 +91,7 @@
 #define free please_use_av_free
     }
 
-    if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) {
+    if (!NeAACEncSetConfiguration(s->faac_handle, faac_cfg)) {
         av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n");
         return -1;
     }
@@ -105,7 +105,7 @@
     FaacAudioContext *s = avctx->priv_data;
     int bytes_written;
 
-    bytes_written = faacEncEncode(s->faac_handle,
+    bytes_written = NeAACEncEncode(s->faac_handle,
                                   data,
                                   avctx->frame_size * avctx->channels,
                                   frame,
@@ -121,7 +121,7 @@
     av_freep(&avctx->coded_frame);
     av_freep(&avctx->extradata);
 
-    faacEncClose(s->faac_handle);
+    NeAACEncClose(s->faac_handle);
     return 0;
 }