-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfaac-1.28-build.diff
331 lines (291 loc) · 12.3 KB
/
faac-1.28-build.diff
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# Patch to fix build error and warnings:
# error: redefinition of strcasestr function from string.h
# warning: deprecated conversion of string constants to char*
# warning: using '==' for comparison between C strings
# warning: using '%llu' for type uint64_t on 64 bits systems
# Copyright (C) 2012 Georgi D. Sotirov <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Visit SlackPack at https://sotirov-bg.net/slackpack/
#
diff -urNad faac-1.28-orig/common/mp4v2/atom_avcC.cpp faac-1.28/common/mp4v2/atom_avcC.cpp
--- faac-1.28-orig/common/mp4v2/atom_avcC.cpp 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/atom_avcC.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -29,7 +29,7 @@
class SizeTableProperty : public MP4TableProperty
{
public:
- SizeTableProperty(char *name, MP4IntegerProperty *pCountProperty) :
+ SizeTableProperty(const char *name, MP4IntegerProperty *pCountProperty) :
MP4TableProperty(name, pCountProperty) {};
protected:
void ReadEntry(MP4File *pFile, u_int32_t index) {
diff -urNad faac-1.28-orig/common/mp4v2/atom_ohdr.cpp faac-1.28/common/mp4v2/atom_ohdr.cpp
--- faac-1.28-orig/common/mp4v2/atom_ohdr.cpp 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/atom_ohdr.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -21,7 +21,7 @@
\param useCountedFormat counted format flag.
\param useUnicode unicode flag.
*/
- OhdrMP4StringProperty(char* name, bool useCountedFormat = false,
+ OhdrMP4StringProperty(const char* name, bool useCountedFormat = false,
bool useUnicode = false): MP4StringProperty(name, useCountedFormat,
useUnicode) {
}
diff -urNad faac-1.28-orig/common/mp4v2/atom_stz2.cpp faac-1.28/common/mp4v2/atom_stz2.cpp
--- faac-1.28-orig/common/mp4v2/atom_stz2.cpp 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/atom_stz2.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -30,7 +30,7 @@
class MP4HalfSizeTableProperty : public MP4TableProperty
{
public:
- MP4HalfSizeTableProperty(char *name, MP4IntegerProperty *pCountProperty) :
+ MP4HalfSizeTableProperty(const char *name, MP4IntegerProperty *pCountProperty) :
MP4TableProperty(name, pCountProperty) {};
// The count is half the actual size
diff -urNad faac-1.28-orig/common/mp4v2/mp4atom.cpp faac-1.28/common/mp4v2/mp4atom.cpp
--- faac-1.28-orig/common/mp4v2/mp4atom.cpp 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4atom.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -806,7 +806,7 @@
AddProperty(new MP4Integer24Property("flags"));
}
-void MP4Atom::AddReserved(char* name, u_int32_t size)
+void MP4Atom::AddReserved(const char* name, u_int32_t size)
{
MP4BytesProperty* pReserved = new MP4BytesProperty(name, size);
pReserved->SetReadOnly();
diff -urNad faac-1.28-orig/common/mp4v2/mp4atom.h faac-1.28/common/mp4v2/mp4atom.h
--- faac-1.28-orig/common/mp4v2/mp4atom.h 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4atom.h 2012-09-01 19:49:19.000000000 +0300
@@ -204,7 +204,7 @@
void AddVersionAndFlags();
- void AddReserved(char* name, u_int32_t size);
+ void AddReserved(const char* name, u_int32_t size);
void ExpectChildAtom(const char* name,
bool mandatory, bool onlyOne = true);
diff -urNad faac-1.28-orig/common/mp4v2/mp4file.cpp faac-1.28/common/mp4v2/mp4file.cpp
--- faac-1.28-orig/common/mp4v2/mp4file.cpp 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4file.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -718,7 +718,7 @@
}
}
-void MP4File::ProtectWriteOperation(char* where)
+void MP4File::ProtectWriteOperation(const char* where)
{
if (m_mode == 'r') {
throw new MP4Error("operation not permitted in read mode", where);
@@ -1274,7 +1274,7 @@
}
// NULL terminated list of brands which require the IODS atom
-char *brandsWithIods[] = { "mp42",
+const char *brandsWithIods[] = { "mp42",
"isom",
NULL};
@@ -2211,11 +2211,11 @@
for (u_int32_t i = 0; i < m_pTracks.Size(); i++) {
if (!strcmp(normType, m_pTracks[i]->GetType())) {
if (subType) {
- if (normType == MP4_AUDIO_TRACK_TYPE) {
+ if (!strcmp(normType, MP4_AUDIO_TRACK_TYPE)) {
if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
continue;
}
- } else if (normType == MP4_VIDEO_TRACK_TYPE) {
+ } else if (!strcmp(normType,MP4_VIDEO_TRACK_TYPE)) {
if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
continue;
}
@@ -2278,11 +2278,11 @@
for (u_int32_t i = 0; i < m_pTracks.Size(); i++) {
if (!strcmp(normType, m_pTracks[i]->GetType())) {
if (subType) {
- if (normType == MP4_AUDIO_TRACK_TYPE) {
+ if (!strcmp(normType,MP4_AUDIO_TRACK_TYPE)) {
if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
continue;
}
- } else if (normType == MP4_VIDEO_TRACK_TYPE) {
+ } else if (!strcmp(normType,MP4_VIDEO_TRACK_TYPE)) {
if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
continue;
}
diff -urNad faac-1.28-orig/common/mp4v2/mp4file.h faac-1.28/common/mp4v2/mp4file.h
--- faac-1.28-orig/common/mp4v2/mp4file.h 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4file.h 2012-09-01 19:49:19.000000000 +0300
@@ -700,7 +700,7 @@
const char* TempFileName();
void Rename(const char* existingFileName, const char* newFileName);
- void ProtectWriteOperation(char* where);
+ void ProtectWriteOperation(const char* where);
void FindIntegerProperty(const char* name,
MP4Property** ppProperty, u_int32_t* pIndex = NULL);
diff -urNad faac-1.28-orig/common/mp4v2/mp4property.cpp faac-1.28/common/mp4v2/mp4property.cpp
--- faac-1.28-orig/common/mp4v2/mp4property.cpp 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4property.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -313,7 +313,7 @@
// MP4StringProperty
-MP4StringProperty::MP4StringProperty(char* name,
+MP4StringProperty::MP4StringProperty(const char* name,
bool useCountedFormat, bool useUnicode)
: MP4Property(name)
{
@@ -420,7 +420,7 @@
// MP4BytesProperty
-MP4BytesProperty::MP4BytesProperty(char* name, u_int32_t valueSize,
+MP4BytesProperty::MP4BytesProperty(const char* name, u_int32_t valueSize,
u_int32_t defaultValueSize)
: MP4Property(name)
{
@@ -549,7 +549,7 @@
// MP4TableProperty
-MP4TableProperty::MP4TableProperty(char* name, MP4IntegerProperty* pCountProperty)
+MP4TableProperty::MP4TableProperty(const char* name, MP4IntegerProperty* pCountProperty)
: MP4Property(name)
{
m_pCountProperty = pCountProperty;
@@ -725,7 +725,7 @@
// MP4DescriptorProperty
-MP4DescriptorProperty::MP4DescriptorProperty(char* name,
+MP4DescriptorProperty::MP4DescriptorProperty(const char* name,
u_int8_t tagsStart, u_int8_t tagsEnd, bool mandatory, bool onlyOne)
: MP4Property(name)
{
diff -urNad faac-1.28-orig/common/mp4v2/mp4property.h faac-1.28/common/mp4v2/mp4property.h
--- faac-1.28-orig/common/mp4v2/mp4property.h 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4property.h 2012-09-01 19:49:19.000000000 +0300
@@ -100,7 +100,7 @@
class MP4IntegerProperty : public MP4Property {
protected:
- MP4IntegerProperty(char* name)
+ MP4IntegerProperty(const char* name)
: MP4Property(name) { };
public:
@@ -118,7 +118,7 @@
#define MP4INTEGER_PROPERTY_DECL2(isize, xsize) \
class MP4Integer##xsize##Property : public MP4IntegerProperty { \
public: \
- MP4Integer##xsize##Property(char* name) \
+ MP4Integer##xsize##Property(const char* name) \
: MP4IntegerProperty(name) { \
SetCount(1); \
m_values[0] = 0; \
@@ -188,7 +188,7 @@
class MP4BitfieldProperty : public MP4Integer64Property {
public:
- MP4BitfieldProperty(char* name, u_int8_t numBits)
+ MP4BitfieldProperty(const char* name, u_int8_t numBits)
: MP4Integer64Property(name) {
ASSERT(numBits != 0);
ASSERT(numBits <= 64);
@@ -213,7 +213,7 @@
class MP4Float32Property : public MP4Property {
public:
- MP4Float32Property(char* name)
+ MP4Float32Property(const char* name)
: MP4Property(name) {
m_useFixed16Format = false;
m_useFixed32Format = false;
@@ -280,7 +280,7 @@
class MP4StringProperty : public MP4Property {
public:
- MP4StringProperty(char* name,
+ MP4StringProperty(const char* name,
bool useCountedFormat = false, bool useUnicode = false);
~MP4StringProperty();
@@ -355,7 +355,7 @@
class MP4BytesProperty : public MP4Property {
public:
- MP4BytesProperty(char* name, u_int32_t valueSize = 0,
+ MP4BytesProperty(const char* name, u_int32_t valueSize = 0,
u_int32_t defaultValueSize = 0);
~MP4BytesProperty();
@@ -419,7 +419,7 @@
class MP4TableProperty : public MP4Property {
public:
- MP4TableProperty(char* name, MP4IntegerProperty* pCountProperty);
+ MP4TableProperty(const char* name, MP4IntegerProperty* pCountProperty);
~MP4TableProperty();
@@ -469,7 +469,7 @@
class MP4DescriptorProperty : public MP4Property {
public:
- MP4DescriptorProperty(char* name = NULL,
+ MP4DescriptorProperty(const char* name = NULL,
u_int8_t tagsStart = 0, u_int8_t tagsEnd = 0,
bool mandatory = false, bool onlyOne = false);
@@ -531,7 +531,7 @@
class MP4QosQualifierProperty : public MP4DescriptorProperty {
public:
- MP4QosQualifierProperty(char* name = NULL,
+ MP4QosQualifierProperty(const char* name = NULL,
u_int8_t tagsStart = 0, u_int8_t tagsEnd = 0,
bool mandatory = false, bool onlyOne = false) :
MP4DescriptorProperty(name, tagsStart, tagsEnd, mandatory, onlyOne) { }
diff -urNad faac-1.28-orig/common/mp4v2/mp4track.cpp faac-1.28/common/mp4v2/mp4track.cpp
--- faac-1.28-orig/common/mp4v2/mp4track.cpp 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4track.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -1360,7 +1360,7 @@
}
}
-MP4Atom* MP4Track::AddAtom(char* parentName, char* childName)
+MP4Atom* MP4Track::AddAtom(const char* parentName, const char* childName)
{
MP4Atom* pChildAtom = MP4Atom::CreateAtom(childName);
diff -urNad faac-1.28-orig/common/mp4v2/mp4track.h faac-1.28/common/mp4v2/mp4track.h
--- faac-1.28-orig/common/mp4v2/mp4track.h 2009-01-25 03:14:34.000000000 +0200
+++ faac-1.28/common/mp4v2/mp4track.h 2012-09-01 19:49:19.000000000 +0300
@@ -168,7 +168,7 @@
void UpdateSyncSamples(MP4SampleId sampleId,
bool isSyncSample);
- MP4Atom* AddAtom(char* parentName, char* childName);
+ MP4Atom* AddAtom(const char* parentName, const char* childName);
void UpdateDurations(MP4Duration duration);
MP4Duration ToMovieDuration(MP4Duration trackDuration);
diff -urNad faac-1.28-orig/common/mp4v2/mpeg4ip.h faac-1.28/common/mp4v2/mpeg4ip.h
--- faac-1.28-orig/common/mp4v2/mpeg4ip.h 2009-01-27 00:42:35.000000000 +0200
+++ faac-1.28/common/mp4v2/mpeg4ip.h 2012-09-01 19:50:55.000000000 +0300
@@ -120,14 +120,6 @@
#endif
#include <sys/param.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-char *strcasestr(const char *haystack, const char *needle);
-#ifdef __cplusplus
-}
-#endif
-
#define OPEN_RDWR O_RDWR
#define OPEN_CREAT O_CREAT
#define OPEN_RDONLY O_RDONLY
@@ -135,7 +127,7 @@
#define closesocket close
#define IOSBINARY ios::bin
-#if SIZEOF_LONG == 8
+#if __WORDSIZE == 64
#define MAX_UINT64 -1LU
#define D64F "ld"
#define U64F "lu"
diff -urNad faac-1.28-orig/common/mp4v2/ocidescriptors.cpp faac-1.28/common/mp4v2/ocidescriptors.cpp
--- faac-1.28-orig/common/mp4v2/ocidescriptors.cpp 2004-07-27 11:28:24.000000000 +0300
+++ faac-1.28/common/mp4v2/ocidescriptors.cpp 2012-09-01 19:49:19.000000000 +0300
@@ -171,7 +171,7 @@
class MP4CreatorTableProperty : public MP4TableProperty {
public:
- MP4CreatorTableProperty(char* name, MP4Integer8Property* pCountProperty) :
+ MP4CreatorTableProperty(const char* name, MP4Integer8Property* pCountProperty) :
MP4TableProperty(name, pCountProperty) {
};
protected: