Remove all patches that were either applied, solved differently or disapproved upstream
Fabian Greffrath
8 years ago
0 | Author: Fabian Greffrath <fabian+debian@greffrath.com> | |
1 | Description: Fix most autotools warnings | |
2 | ||
3 | --- a/Makefile.am | |
4 | +++ b/Makefile.am | |
5 | @@ -2,6 +2,8 @@ SUBDIRS = libfaad common frontend plugin | |
6 | ||
7 | EXTRA_DIST = faad2.spec | |
8 | ||
9 | +ACLOCAL_AMFLAGS = -I m4 | |
10 | + | |
11 | rpm: Makefile | |
12 | make dist | |
13 | $(RPMBUILD) -ta $(PACKAGE)-$(VERSION).tar.gz | |
14 | --- a/configure.in | |
15 | +++ b/configure.in | |
16 | @@ -7,9 +7,10 @@ dnl - faad | |
17 | dnl - xmms input mp4/aac plugin | |
18 | dnl - mpeg4ip plugin (requires mpeg4ip's libmp4v2 to be installed) | |
19 | ||
20 | -AC_INIT | |
21 | +AC_INIT([faad2], [2.7.0]) | |
22 | AC_CONFIG_AUX_DIR(.) | |
23 | -AM_INIT_AUTOMAKE(faad2, 2.7.0) | |
24 | +AM_INIT_AUTOMAKE([subdir-objects]) | |
25 | +AC_CONFIG_MACRO_DIR([m4]) | |
26 | ||
27 | AC_PROG_LIBTOOL | |
28 | AC_SUBST(LIBTOOL_DEPS) | |
29 | --- a/frontend/Makefile.am | |
30 | +++ b/frontend/Makefile.am | |
31 | @@ -1,7 +1,7 @@ | |
32 | bin_PROGRAMS = faad | |
33 | man_MANS = faad.man | |
34 | ||
35 | -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/common/faad \ | |
36 | +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/common/faad \ | |
37 | -I$(top_srcdir)/common/mp4ff | |
38 | ||
39 | faad_LDADD = $(top_builddir)/libfaad/libfaad.la \ | |
40 | --- a/plugins/mpeg4ip/Makefile.am | |
41 | +++ b/plugins/mpeg4ip/Makefile.am | |
42 | @@ -13,7 +13,7 @@ faad2_plugin_la_LIBADD = \ | |
43 | -lm | |
44 | ||
45 | ||
46 | -INCLUDES = -I$(top_srcdir)/include | |
47 | +AM_CPPFLAGS = -I$(top_srcdir)/include | |
48 | ||
49 | AM_CFLAGS = -D_REENTRANT -fexceptions | |
50 |
0 | Description: The patch enables input on stdin for AAC/AAC+ streams. | |
1 | Origin: http://www.freebsd.org/cgi/cvsweb.cgi/ports/audio/faad/files/patch-frontend_main.c | |
2 | Bug: http://bugs.slimdevices.com/show_bug.cgi?id=10602 | |
3 | Forwarded: menno@audiocoding.com | |
4 | Author: Bryan Alton | |
5 | Reviewed-By: Mark Knight <http://www.freebsd.org/cgi/query-pr.cgi?pr=138213> | |
6 | Bug-Ubuntu: https://launchpad.net/bugs/470562 | |
7 | ||
8 | $FreeBSD: ports/audio/faad/files/patch-frontend_main.c,v 1.3 2010/02/25 17:12:54 brooks Exp $ | |
9 | ||
10 | --- faad2.orig/frontend/main.c | |
11 | +++ faad2/frontend/main.c | |
12 | @@ -137,6 +137,31 @@ static void advance_buffer(aac_buffer *b | |
13 | b->bytes_into_buffer = 0; | |
14 | } | |
15 | ||
16 | +static void lookforheader(aac_buffer *b) | |
17 | +{ | |
18 | + int i = 0; | |
19 | + while (!b->at_eof ) | |
20 | + { | |
21 | + if (b->bytes_into_buffer > 4) | |
22 | + { | |
23 | + if( ((b->buffer[0+i] == 0xff) && ((b->buffer[1+i] & 0xf6) == 0xf0)) || | |
24 | + (b->buffer[0+i] == 'A' && b->buffer[1+i] == 'D' && b->buffer[2+i] == 'I' && b->buffer[3+i] == 'F')) | |
25 | + { | |
26 | + fill_buffer(b); | |
27 | + break; | |
28 | + } else { | |
29 | + i++; | |
30 | + b->file_offset += 1; | |
31 | + b->bytes_consumed += 1; | |
32 | + b->bytes_into_buffer -= 1; | |
33 | + } | |
34 | + } else { | |
35 | + fill_buffer(b); | |
36 | + i = 0; | |
37 | + } | |
38 | + } | |
39 | +} | |
40 | + | |
41 | static int adts_sample_rates[] = {96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000,7350,0,0,0}; | |
42 | ||
43 | static int adts_parse(aac_buffer *b, int *bitrate, float *length) | |
44 | @@ -424,6 +449,8 @@ static int decodeAACfile(char *aacfile, | |
45 | float length = 0; | |
46 | ||
47 | int first_time = 1; | |
48 | + int retval; | |
49 | + int streaminput = 0; | |
50 | ||
51 | aac_buffer b; | |
52 | ||
53 | @@ -439,17 +466,39 @@ static int decodeAACfile(char *aacfile, | |
54 | } | |
55 | } | |
56 | ||
57 | - b.infile = fopen(aacfile, "rb"); | |
58 | - if (b.infile == NULL) | |
59 | + if (0 == strcmp(aacfile, "-")) | |
60 | { | |
61 | - /* unable to open file */ | |
62 | - faad_fprintf(stderr, "Error opening file: %s\n", aacfile); | |
63 | - return 1; | |
64 | + b.infile = stdin; | |
65 | +#ifdef _WIN32 | |
66 | + setmode(fileno(stdin), O_BINARY); | |
67 | +#endif | |
68 | + | |
69 | + } else | |
70 | + { | |
71 | + b.infile = fopen(aacfile, "rb"); | |
72 | + if (b.infile == NULL) | |
73 | + { | |
74 | + /* unable to open file */ | |
75 | + faad_fprintf(stderr, "Error opening file: %s\n", aacfile); | |
76 | + return 1; | |
77 | + } | |
78 | } | |
79 | ||
80 | - fseek(b.infile, 0, SEEK_END); | |
81 | - fileread = ftell(b.infile); | |
82 | - fseek(b.infile, 0, SEEK_SET); | |
83 | + retval = fseek(b.infile, 0, SEEK_END); | |
84 | +#ifdef _WIN32 | |
85 | + if (0 == strcmp(aacfile, "-")) { | |
86 | + retval = -1; | |
87 | + } | |
88 | +#endif | |
89 | + if (retval ) | |
90 | + { | |
91 | + faad_fprintf(stderr, "Input not seekable %s\n", aacfile); | |
92 | + fileread = -1; | |
93 | + streaminput = 1; | |
94 | + } else { | |
95 | + fileread = ftell(b.infile); | |
96 | + fseek(b.infile, 0, SEEK_SET); | |
97 | + }; | |
98 | ||
99 | if (!(b.buffer = (unsigned char*)malloc(FAAD_MIN_STREAMSIZE*MAX_CHANNELS))) | |
100 | { | |
101 | @@ -494,19 +543,39 @@ static int decodeAACfile(char *aacfile, | |
102 | ||
103 | /* get AAC infos for printing */ | |
104 | header_type = 0; | |
105 | + if (streaminput == 1 ) | |
106 | + lookforheader(&b); | |
107 | + | |
108 | if ((b.buffer[0] == 0xFF) && ((b.buffer[1] & 0xF6) == 0xF0)) | |
109 | { | |
110 | - adts_parse(&b, &bitrate, &length); | |
111 | - fseek(b.infile, tagsize, SEEK_SET); | |
112 | - | |
113 | - bread = fread(b.buffer, 1, FAAD_MIN_STREAMSIZE*MAX_CHANNELS, b.infile); | |
114 | - if (bread != FAAD_MIN_STREAMSIZE*MAX_CHANNELS) | |
115 | - b.at_eof = 1; | |
116 | - else | |
117 | - b.at_eof = 0; | |
118 | - b.bytes_into_buffer = bread; | |
119 | - b.bytes_consumed = 0; | |
120 | - b.file_offset = tagsize; | |
121 | + if (streaminput ==1) | |
122 | + { | |
123 | + int frames, frame_length; | |
124 | + int samplerate; | |
125 | + float frames_per_sec, bytes_per_frame; | |
126 | + samplerate = adts_sample_rates[(b.buffer[2]&0x3c)>>2]; | |
127 | + frame_length = ((((unsigned int)b.buffer[3] & 0x3)) << 11) | |
128 | + | (((unsigned int)b.buffer[4]) << 3) | (b.buffer[5] >> 5); | |
129 | + | |
130 | + frames_per_sec = (float)samplerate/1024.0f; | |
131 | + bytes_per_frame = (float)frame_length/(float)(1000); | |
132 | + bitrate = (int)(8. * bytes_per_frame * frames_per_sec + 0.5); | |
133 | + length = 1; | |
134 | + faad_fprintf(stderr, "Streamed input format samplerate %d channels %d.\n",samplerate,channels); | |
135 | + | |
136 | + } else { | |
137 | + adts_parse(&b, &bitrate, &length); | |
138 | + fseek(b.infile, tagsize, SEEK_SET); | |
139 | + | |
140 | + bread = fread(b.buffer, 1, FAAD_MIN_STREAMSIZE*MAX_CHANNELS, b.infile); | |
141 | + if (bread != FAAD_MIN_STREAMSIZE*MAX_CHANNELS) | |
142 | + b.at_eof = 1; | |
143 | + else | |
144 | + b.at_eof = 0; | |
145 | + b.bytes_into_buffer = bread; | |
146 | + b.bytes_consumed = 0; | |
147 | + b.file_offset = tagsize; | |
148 | + } | |
149 | ||
150 | header_type = 1; | |
151 | } else if (memcmp(b.buffer, "ADIF", 4) == 0) { | |
152 | @@ -538,7 +607,8 @@ static int decodeAACfile(char *aacfile, | |
153 | if (b.buffer) | |
154 | free(b.buffer); | |
155 | NeAACDecClose(hDecoder); | |
156 | - fclose(b.infile); | |
157 | + if (b.infile != stdin) | |
158 | + fclose(b.infile); | |
159 | return 1; | |
160 | } | |
161 | advance_buffer(&b, bread); | |
162 | @@ -564,7 +634,8 @@ static int decodeAACfile(char *aacfile, | |
163 | if (infoOnly) | |
164 | { | |
165 | NeAACDecClose(hDecoder); | |
166 | - fclose(b.infile); | |
167 | + if (b.infile != stdin) | |
168 | + fclose(b.infile); | |
169 | if (b.buffer) | |
170 | free(b.buffer); | |
171 | return 0; | |
172 | @@ -621,7 +692,8 @@ static int decodeAACfile(char *aacfile, | |
173 | if (b.buffer) | |
174 | free(b.buffer); | |
175 | NeAACDecClose(hDecoder); | |
176 | - fclose(b.infile); | |
177 | + if (b.infile != stdin) | |
178 | + fclose(b.infile); | |
179 | return 0; | |
180 | } | |
181 | } else { | |
182 | @@ -662,7 +734,8 @@ static int decodeAACfile(char *aacfile, | |
183 | fclose(adtsFile); | |
184 | } | |
185 | ||
186 | - fclose(b.infile); | |
187 | + if (b.infile != stdin) | |
188 | + fclose(b.infile); | |
189 | ||
190 | if (!first_time && !adts_out) | |
191 | close_audio_file(aufile); | |
192 | @@ -750,6 +823,11 @@ static int decodeMP4file(char *mp4file, | |
193 | /* initialise the callback structure */ | |
194 | mp4ff_callback_t *mp4cb = malloc(sizeof(mp4ff_callback_t)); | |
195 | ||
196 | + if (strcmp(mp4file, "-") == 0 ) { | |
197 | + faad_fprintf(stderr, "Cannot open stdin for MP4 input \n"); | |
198 | + return 1; | |
199 | + } | |
200 | + | |
201 | mp4File = fopen(mp4file, "rb"); | |
202 | mp4cb->read = read_callback; | |
203 | mp4cb->seek = seek_callback; | |
204 | @@ -1016,6 +1094,7 @@ int main(int argc, char *argv[]) | |
205 | int result; | |
206 | int infoOnly = 0; | |
207 | int writeToStdio = 0; | |
208 | + int readFromStdin = 0; | |
209 | int object_type = LC; | |
210 | int def_srate = 0; | |
211 | int downMatrix = 0; | |
212 | @@ -1229,15 +1308,30 @@ int main(int argc, char *argv[]) | |
213 | } | |
214 | ||
215 | /* check for mp4 file */ | |
216 | - mp4file = 0; | |
217 | - hMP4File = fopen(aacFileName, "rb"); | |
218 | - if (!hMP4File) | |
219 | - { | |
220 | - faad_fprintf(stderr, "Error opening file: %s\n", aacFileName); | |
221 | - return 1; | |
222 | + if (0 == strcmp(aacFileName, "-")) { | |
223 | + faad_fprintf(stderr, "Reading from stdin: %s\n", aacFileName); | |
224 | + readFromStdin = 1; | |
225 | + hMP4File = stdin; | |
226 | +#ifdef _WIN32 | |
227 | + setmode(fileno(stdin), O_BINARY); | |
228 | +#endif | |
229 | + | |
230 | + } else { | |
231 | + | |
232 | + mp4file = 0; | |
233 | + hMP4File = fopen(aacFileName, "rb"); | |
234 | + if (!hMP4File) | |
235 | + { | |
236 | + faad_fprintf(stderr, "Error opening file: %s\n", aacFileName); | |
237 | + return 1; | |
238 | + } | |
239 | } | |
240 | + | |
241 | fread(header, 1, 8, hMP4File); | |
242 | - fclose(hMP4File); | |
243 | + | |
244 | + if (! readFromStdin ) | |
245 | + fclose(hMP4File); | |
246 | + | |
247 | if (header[4] == 'f' && header[5] == 't' && header[6] == 'y' && header[7] == 'p') | |
248 | mp4file = 1; | |
249 | ||
250 | @@ -1246,6 +1340,18 @@ int main(int argc, char *argv[]) | |
251 | result = decodeMP4file(aacFileName, audioFileName, adtsFileName, writeToStdio, | |
252 | outputFormat, format, downMatrix, noGapless, infoOnly, adts_out, &length); | |
253 | } else { | |
254 | + | |
255 | + if (readFromStdin == 1) { | |
256 | + ungetc(header[7],hMP4File); | |
257 | + ungetc(header[6],hMP4File); | |
258 | + ungetc(header[5],hMP4File); | |
259 | + ungetc(header[4],hMP4File); | |
260 | + ungetc(header[3],hMP4File); | |
261 | + ungetc(header[2],hMP4File); | |
262 | + ungetc(header[1],hMP4File); | |
263 | + ungetc(header[0],hMP4File); | |
264 | + } | |
265 | + | |
266 | result = decodeAACfile(aacFileName, audioFileName, adtsFileName, writeToStdio, | |
267 | def_srate, object_type, outputFormat, format, downMatrix, infoOnly, adts_out, | |
268 | old_format, &length); |
0 | Description: Correctly declare lrintf in libfaad/common.h to avoid | |
1 | a conflict of declaration in mathcalls.h to fix FTBFS on i386. | |
2 | Origin: Ubuntu | |
3 | Author: Bhavani Shankar <bhavi@ubuntu.com> | |
4 | ||
5 | Index: faad2-2.7/libfaad/common.h | |
6 | ===================================== | |
7 | --- faad2-2.7.orig/libfaad/common.h | |
8 | +++ faad2-2.7/libfaad/common.h | |
9 | @@ -330,7 +330,7 @@ | |
10 | #ifndef HAVE_LRINTF | |
11 | #define HAS_LRINTF | |
12 | // from http://www.stereopsis.com/FPU.html | |
13 | - static INLINE int lrintf(float f) | |
14 | + static INLINE int _lrintf(float f) | |
15 | { | |
16 | int i; | |
17 | __asm__ __volatile__ ( | |
18 | @@ -396,7 +396,7 @@ | |
19 | ||
20 | #ifndef HAS_LRINTF | |
21 | /* standard cast */ | |
22 | -#define lrintf(f) ((int32_t)(f)) | |
23 | +#define _lrintf(f) ((int32_t)(f)) | |
24 | #endif | |
25 | ||
26 | typedef real_t complex_t[2]; |
0 | Description: faad segfaults on amd64 due to incorrect pointer size | |
1 | When running faad with a command line similar to: | |
2 | alessio@alessio-laptop:~$ faad -b 2 -f 2 -w sample.aac | |
3 | a SIGSEGV gets raised. This issue is due to an incorrect pointer size | |
4 | used in the write_audio{32,64}bit functions. | |
5 | Origin: Ubuntu | |
6 | Bug: https://sourceforge.net/support/tracker.php?aid=3110758 | |
7 | Bug-Debian: http://bugs.debian.org/603807 | |
8 | Bug-Ubuntu: https://launchpad.net/bugs/665802 | |
9 | Reviewed-by: Alessio Treglia <alessio@debian.org> | |
10 | Last-Update: 2010-11-17 | |
11 | --- | |
12 | frontend/audio.c | 4 ++-- | |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
14 | ||
15 | --- a/frontend/audio.c | |
16 | +++ b/frontend/audio.c | |
17 | @@ -347,7 +347,7 @@ | |
18 | { | |
19 | int ret; | |
20 | unsigned int i; | |
21 | - long *sample_buffer24 = (long*)sample_buffer; | |
22 | + int *sample_buffer24 = (int*)sample_buffer; | |
23 | char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8); | |
24 | ||
25 | aufile->total_samples += samples; | |
26 | @@ -391,7 +391,7 @@ | |
27 | { | |
28 | int ret; | |
29 | unsigned int i; | |
30 | - long *sample_buffer32 = (long*)sample_buffer; | |
31 | + int *sample_buffer32 = (int*)sample_buffer; | |
32 | char *data = malloc(samples*aufile->bits_per_sample*sizeof(char)/8); | |
33 | ||
34 | aufile->total_samples += samples; |
0 | Author: Julian Cable <julian_cable@yahoo.com> | |
1 | Description: build the DRM version of the library as well as the normal version | |
2 | ||
3 | --- a/libfaad/Makefile.am | |
4 | +++ b/libfaad/Makefile.am | |
5 | @@ -1,4 +1,4 @@ | |
6 | -lib_LTLIBRARIES = libfaad.la | |
7 | +lib_LTLIBRARIES = libfaad.la libfaad_drm.la | |
8 | ||
9 | AM_CPPFLAGS = -iquote $(top_srcdir)/include | |
10 | include_HEADERS = $(top_srcdir)/include/faad.h \ | |
11 | @@ -29,3 +29,8 @@ libfaad_la_SOURCES = bits.c cfft.c decod | |
12 | codebook/hcb_1.h codebook/hcb_2.h codebook/hcb_3.h codebook/hcb_4.h \ | |
13 | codebook/hcb_5.h codebook/hcb_6.h codebook/hcb_7.h codebook/hcb_8.h \ | |
14 | codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h | |
15 | + | |
16 | +libfaad_drm_la_LDFLAGS = ${libfaad_la_LDFLAGS} | |
17 | +libfaad_drm_la_LIBADD = ${libfaad_la_LIBADD} | |
18 | +libfaad_drm_la_CFLAGS = ${libfaad_la_CFLAGS} -DDRM -DDRM_PS | |
19 | +libfaad_drm_la_SOURCES = ${libfaad_la_SOURCES} |
0 | Fix hyphen in manpage. | |
1 | ========================================================================== | |
2 | --- a/frontend/faad.man | |
3 | +++ b/frontend/faad.man | |
4 | @@ -24,9 +24,9 @@ | |
5 | .br | |
6 | 3: 32\(hybit PCM data. | |
7 | .br | |
8 | -4: 32\(hybit floating\hy(point data. | |
9 | +4: 32\(hybit floating\(hypoint data. | |
10 | .br | |
11 | -5: 64\(hybit floating\hy(point data. | |
12 | +5: 64\(hybit floating\(hypoint data. | |
13 | .RE | |
14 | .RE | |
15 | .TP |
0 | Description: libmp4ff ist not packaged, so do not install it either. | |
1 | Author: Fabian Greffrath <fabian+debian@greffrath.com> | |
2 | ||
3 | --- faad2.orig/common/mp4ff/Makefile.am | |
4 | +++ faad2/common/mp4ff/Makefile.am | |
5 | @@ -1,5 +1,5 @@ | |
6 | -lib_LIBRARIES = libmp4ff.a | |
7 | -include_HEADERS = mp4ff.h mp4ffint.h | |
8 | +noinst_LIBRARIES = libmp4ff.a | |
9 | +noinst_HEADERS = mp4ff.h mp4ffint.h | |
10 | ||
11 | libmp4ff_a_CFLAGS = -DUSE_TAGGING=1 | |
12 |
0 | Description: Dynamically allocate file name buffers. | |
1 | Author: Fabian Greffrath <fabian+debian@greffrath.com> | |
2 | Bug-Ubuntu: https://launchpad.net/bugs/475050 | |
3 | Last-Update: 2011-11-11 | |
4 | ||
5 | --- faad.orig/frontend/main.c | |
6 | +++ faad/frontend/main.c | |
7 | @@ -1107,9 +1107,9 @@ int main(int argc, char *argv[]) | |
8 | int mp4file = 0; | |
9 | int noGapless = 0; | |
10 | char *fnp; | |
11 | - char aacFileName[255]; | |
12 | - char audioFileName[255]; | |
13 | - char adtsFileName[255]; | |
14 | + char *aacFileName = NULL; | |
15 | + char *audioFileName = NULL; | |
16 | + char *adtsFileName = NULL; | |
17 | unsigned char header[8]; | |
18 | float length = 0; | |
19 | FILE *hMP4File; | |
20 | @@ -1157,6 +1157,12 @@ int main(int argc, char *argv[]) | |
21 | if (optarg) | |
22 | { | |
23 | outfile_set = 1; | |
24 | + audioFileName = (char *) malloc(sizeof(char) * (strlen(optarg) + 1)); | |
25 | + if (audioFileName == NULL) | |
26 | + { | |
27 | + faad_fprintf(stderr, "Error allocating memory for audioFileName.\n"); | |
28 | + return 1; | |
29 | + } | |
30 | strcpy(audioFileName, optarg); | |
31 | } | |
32 | break; | |
33 | @@ -1164,6 +1170,12 @@ int main(int argc, char *argv[]) | |
34 | if (optarg) | |
35 | { | |
36 | adts_out = 1; | |
37 | + adtsFileName = (char *) malloc(sizeof(char) * (strlen(optarg) + 1)); | |
38 | + if (adtsFileName == NULL) | |
39 | + { | |
40 | + faad_fprintf(stderr, "Error allocating memory for adtsFileName.\n"); | |
41 | + return 1; | |
42 | + } | |
43 | strcpy(adtsFileName, optarg); | |
44 | } | |
45 | break; | |
46 | @@ -1284,6 +1296,12 @@ int main(int argc, char *argv[]) | |
47 | #endif | |
48 | ||
49 | /* point to the specified file name */ | |
50 | + aacFileName = (char *) malloc(sizeof(char) * (strlen(argv[optind]) + 1)); | |
51 | + if (aacFileName == NULL) | |
52 | + { | |
53 | + faad_fprintf(stderr, "Error allocating memory for aacFileName.\n"); | |
54 | + return 1; | |
55 | + } | |
56 | strcpy(aacFileName, argv[optind]); | |
57 | ||
58 | #ifdef _WIN32 | |
59 | @@ -1297,6 +1315,12 @@ int main(int argc, char *argv[]) | |
60 | */ | |
61 | if(!writeToStdio && !outfile_set) | |
62 | { | |
63 | + audioFileName = (char *) malloc(sizeof(char) * (strlen(aacFileName) + strlen(file_ext[format]) + 1)); | |
64 | + if (audioFileName == NULL) | |
65 | + { | |
66 | + faad_fprintf(stderr, "Error allocating memory for audioFileName.\n"); | |
67 | + return 1; | |
68 | + } | |
69 | strcpy(audioFileName, aacFileName); | |
70 | ||
71 | fnp = (char *)strrchr(audioFileName,'.'); | |
72 | @@ -1357,6 +1381,11 @@ int main(int argc, char *argv[]) | |
73 | old_format, &length); | |
74 | } | |
75 | ||
76 | + if (audioFileName != NULL) | |
77 | + free (audioFileName); | |
78 | + if (adtsFileName != NULL) | |
79 | + free (adtsFileName); | |
80 | + | |
81 | if (!result && !infoOnly) | |
82 | { | |
83 | #ifdef _WIN32 | |
84 | @@ -1372,5 +1401,8 @@ int main(int argc, char *argv[]) | |
85 | dec_length, length/dec_length); | |
86 | } | |
87 | ||
88 | + if (aacFileName != NULL) | |
89 | + free (aacFileName); | |
90 | + | |
91 | return 0; | |
92 | } |
0 | autotools-compat.patch | |
1 | noinst-mp4ff.patch | |
2 | manpage.patch | |
3 | incorrect_pointer_size.patch | |
4 | bpa-stdin.patch | |
5 | path_max.patch | |
6 | fix_ftbfs_with_gcc4.5.patch | |
7 | symbol-visibility.patch | |
8 | libfaad-drm.patch |
0 | Description: Set appropriate symbol visibility attributes. | |
1 | Author: Fabian Greffrath <fabian+debian@greffrath.com> | |
2 | ||
3 | --- a/include/neaacdec.h | |
4 | +++ b/include/neaacdec.h | |
5 | @@ -63,6 +63,10 @@ extern "C" { | |
6 | #ifndef NEAACDECAPI | |
7 | #define NEAACDECAPI __cdecl | |
8 | #endif | |
9 | +#elif defined(__GNUC__) && __GNUC__ >= 4 | |
10 | + #ifndef NEAACDECAPI | |
11 | + #define NEAACDECAPI __attribute__((visibility("default"))) | |
12 | + #endif | |
13 | #else | |
14 | #ifndef NEAACDECAPI | |
15 | #define NEAACDECAPI | |
16 | @@ -198,7 +202,7 @@ typedef struct NeAACDecFrameInfo | |
17 | unsigned char ps; | |
18 | } NeAACDecFrameInfo; | |
19 | ||
20 | -char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode); | |
21 | +char NEAACDECAPI *NeAACDecGetErrorMessage(unsigned char errcode); | |
22 | ||
23 | unsigned long NEAACDECAPI NeAACDecGetCapabilities(void); | |
24 | ||
25 | @@ -231,12 +235,12 @@ void NEAACDECAPI NeAACDecPostSeekReset(N | |
26 | ||
27 | void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder); | |
28 | ||
29 | -void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder, | |
30 | +void NEAACDECAPI *NeAACDecDecode(NeAACDecHandle hDecoder, | |
31 | NeAACDecFrameInfo *hInfo, | |
32 | unsigned char *buffer, | |
33 | unsigned long buffer_size); | |
34 | ||
35 | -void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder, | |
36 | +void NEAACDECAPI *NeAACDecDecode2(NeAACDecHandle hDecoder, | |
37 | NeAACDecFrameInfo *hInfo, | |
38 | unsigned char *buffer, | |
39 | unsigned long buffer_size, | |
40 | --- a/libfaad/Makefile.am | |
41 | +++ b/libfaad/Makefile.am | |
42 | @@ -1,11 +1,12 @@ | |
43 | lib_LTLIBRARIES = libfaad.la | |
44 | ||
45 | -AM_CFLAGS = -iquote $(top_srcdir)/include | |
46 | +AM_CPPFLAGS = -iquote $(top_srcdir)/include | |
47 | include_HEADERS = $(top_srcdir)/include/faad.h \ | |
48 | $(top_srcdir)/include/neaacdec.h | |
49 | ||
50 | libfaad_la_LDFLAGS = -version-info 2:0:0 | |
51 | libfaad_la_LIBADD = -lm | |
52 | +libfaad_la_CFLAGS = -fvisibility=hidden | |
53 | ||
54 | libfaad_la_SOURCES = bits.c cfft.c decoder.c drc.c \ | |
55 | drm_dec.c error.c filtbank.c \ | |
56 | --- a/libfaad/decoder.c | |
57 | +++ b/libfaad/decoder.c | |
58 | @@ -64,7 +64,7 @@ static void create_channel_config(NeAACD | |
59 | NeAACDecFrameInfo *hInfo); | |
60 | ||
61 | ||
62 | -char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode) | |
63 | +char NEAACDECAPI *NeAACDecGetErrorMessage(unsigned char errcode) | |
64 | { | |
65 | if (errcode >= NUM_ERROR_MESSAGES) | |
66 | return NULL; | |
67 | @@ -787,7 +787,7 @@ static void create_channel_config(NeAACD | |
68 | } | |
69 | } | |
70 | ||
71 | -void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hpDecoder, | |
72 | +void NEAACDECAPI *NeAACDecDecode(NeAACDecHandle hpDecoder, | |
73 | NeAACDecFrameInfo *hInfo, | |
74 | unsigned char *buffer, | |
75 | unsigned long buffer_size) | |
76 | @@ -796,7 +796,7 @@ void* NEAACDECAPI NeAACDecDecode(NeAACDe | |
77 | return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size, NULL, 0); | |
78 | } | |
79 | ||
80 | -void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hpDecoder, | |
81 | +void NEAACDECAPI *NeAACDecDecode2(NeAACDecHandle hpDecoder, | |
82 | NeAACDecFrameInfo *hInfo, | |
83 | unsigned char *buffer, | |
84 | unsigned long buffer_size, |