1 |
commit: df877f0a7c288987b1638299f3a170092e061571 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 9 22:58:06 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 9 23:13:06 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df877f0a |
7 |
|
8 |
media-video/cinelerra: [QA] Move patches to a distfile |
9 |
|
10 |
Closes: https://bugs.gentoo.org/620600 |
11 |
|
12 |
media-video/cinelerra/Manifest | 3 +- |
13 |
media-video/cinelerra/cinelerra-2.3.ebuild | 25 +- |
14 |
.../files/cinelerra-20140710-ffmpeg-0.11.patch | 134 ----- |
15 |
.../files/cinelerra-20140710-underlinking.patch | 16 - |
16 |
...cinelerra-20140710-validate_desktop_entry.patch | 14 - |
17 |
media-video/cinelerra/files/cinelerra-ffmpeg.patch | 76 --- |
18 |
.../cinelerra/files/cinelerra-ffmpeg2.patch | 218 ------- |
19 |
.../cinelerra/files/cinelerra-ffmpeg29.patch | 658 --------------------- |
20 |
.../cinelerra/files/cinelerra-implicit_decls.patch | 36 -- |
21 |
.../cinelerra/files/cinelerra-includes.patch | 12 - |
22 |
media-video/cinelerra/files/cinelerra-libav9.patch | 93 --- |
23 |
media-video/cinelerra/files/cinelerra-pngtoh.patch | 15 - |
24 |
.../cinelerra/files/cinelerra-putbits-gcc52.patch | 29 - |
25 |
13 files changed, 15 insertions(+), 1314 deletions(-) |
26 |
|
27 |
diff --git a/media-video/cinelerra/Manifest b/media-video/cinelerra/Manifest |
28 |
index f909f9419aa..abe3037e726 100644 |
29 |
--- a/media-video/cinelerra/Manifest |
30 |
+++ b/media-video/cinelerra/Manifest |
31 |
@@ -1 +1,2 @@ |
32 |
-DIST CinelerraCV-2.3.tar.xz 25705608 SHA256 4bcb450347de5eccea0ed6d49d6d70e4b065905516e4416f9a788d0d7ccc926f SHA512 908dc097af8507e3b60b4787e0350500b8ba8c4340bbbdbf3716e61d74074e5f0617500b94ed1d450e030f88f3821f948cfa37c247ec2c2571fd76974374868e WHIRLPOOL 52a74c74cfeacbebd3cf3e2aced7a0054b68ce3ec04309ac608c4e1e5779a9ced8d9ea50a0898b610288aef588b613455b38b46af3ab67c44f3581ef3676b79e |
33 |
+DIST CinelerraCV-2.3.tar.xz 25705608 BLAKE2B 70efe03d8c928faca0b60f76b83d7147a7ef68ebee06e7afcb589fd24d73ecbe96e16a375c38f5c89cf337593c824cc22dd6301790ac988946671cb12ba901e6 SHA512 908dc097af8507e3b60b4787e0350500b8ba8c4340bbbdbf3716e61d74074e5f0617500b94ed1d450e030f88f3821f948cfa37c247ec2c2571fd76974374868e |
34 |
+DIST cinelerra-2.3-patchset.tar.xz 10056 BLAKE2B c50d65a991a2643267f4c9aff11fb8caf09ba1fae0abe89125207312e8129b28f5ca86846b30a94a90b6958704c1733635b0987752a4d2ec442ea185bf870d89 SHA512 9825729ed15e106b1ec2ca58da4d587597d58a6b62f4440e08e984660821fa0e3cc3dcded5da0a5daae16edf1564a45a32490f50e51d77795ce47e4a5ba39122 |
35 |
|
36 |
diff --git a/media-video/cinelerra/cinelerra-2.3.ebuild b/media-video/cinelerra/cinelerra-2.3.ebuild |
37 |
index 812eb75dbb3..9bb4a4e74fd 100644 |
38 |
--- a/media-video/cinelerra/cinelerra-2.3.ebuild |
39 |
+++ b/media-video/cinelerra/cinelerra-2.3.ebuild |
40 |
@@ -6,7 +6,8 @@ inherit autotools eutils multilib flag-o-matic |
41 |
|
42 |
DESCRIPTION="The most advanced non-linear video editor and compositor" |
43 |
HOMEPAGE="http://www.cinelerra.org/" |
44 |
-SRC_URI="https://cinelerra-cv.org/releases/CinelerraCV-${PV}.tar.xz" |
45 |
+SRC_URI="https://cinelerra-cv.org/releases/CinelerraCV-${PV}.tar.xz |
46 |
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.xz" |
47 |
|
48 |
LICENSE="GPL-2" |
49 |
SLOT="0" |
50 |
@@ -58,22 +59,22 @@ S="${WORKDIR}/CinelerraCV-${PV}" |
51 |
|
52 |
src_prepare() { |
53 |
epatch \ |
54 |
- "${FILESDIR}"/${PN}-20140710-validate_desktop_entry.patch \ |
55 |
- "${FILESDIR}"/${PN}-ffmpeg.patch \ |
56 |
- "${FILESDIR}"/${PN}-20140710-underlinking.patch \ |
57 |
- "${FILESDIR}"/${PN}-20140710-ffmpeg-0.11.patch \ |
58 |
- "${FILESDIR}"/${PN}-libav9.patch \ |
59 |
- "${FILESDIR}"/${PN}-pngtoh.patch \ |
60 |
- "${FILESDIR}"/${PN}-putbits-gcc52.patch \ |
61 |
- "${FILESDIR}"/${PN}-implicit_decls.patch \ |
62 |
- "${FILESDIR}"/${PN}-includes.patch |
63 |
+ "${WORKDIR}"/${P}-patchset/${PN}-20140710-validate_desktop_entry.patch \ |
64 |
+ "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg.patch \ |
65 |
+ "${WORKDIR}"/${P}-patchset/${PN}-20140710-underlinking.patch \ |
66 |
+ "${WORKDIR}"/${P}-patchset/${PN}-20140710-ffmpeg-0.11.patch \ |
67 |
+ "${WORKDIR}"/${P}-patchset/${PN}-libav9.patch \ |
68 |
+ "${WORKDIR}"/${P}-patchset/${PN}-pngtoh.patch \ |
69 |
+ "${WORKDIR}"/${P}-patchset/${PN}-putbits-gcc52.patch \ |
70 |
+ "${WORKDIR}"/${P}-patchset/${PN}-implicit_decls.patch \ |
71 |
+ "${WORKDIR}"/${P}-patchset/${PN}-includes.patch |
72 |
|
73 |
if has_version '>=media-video/ffmpeg-2' ; then |
74 |
- epatch "${FILESDIR}"/${PN}-ffmpeg2.patch |
75 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg2.patch |
76 |
fi |
77 |
|
78 |
if has_version '>=media-video/ffmpeg-2.9' ; then |
79 |
- epatch "${FILESDIR}"/${PN}-ffmpeg29.patch |
80 |
+ epatch "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg29.patch |
81 |
fi |
82 |
|
83 |
eautoreconf |
84 |
|
85 |
diff --git a/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch b/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch |
86 |
deleted file mode 100644 |
87 |
index 2aebd7008c3..00000000000 |
88 |
--- a/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch |
89 |
+++ /dev/null |
90 |
@@ -1,134 +0,0 @@ |
91 |
---- cinelerra/ffmpeg.C |
92 |
-+++ cinelerra/ffmpeg.C |
93 |
-@@ -23,7 +23,6 @@ |
94 |
- |
95 |
- int FFMPEG::init(char *codec_string) { |
96 |
- |
97 |
-- avcodec_init(); |
98 |
- avcodec_register_all(); |
99 |
- |
100 |
- CodecID id = codec_id(codec_string); |
101 |
---- cinelerra/fileac3.C |
102 |
-+++ cinelerra/fileac3.C |
103 |
-@@ -84,7 +84,6 @@ |
104 |
- |
105 |
- if(wr) |
106 |
- { |
107 |
-- avcodec_init(); |
108 |
- avcodec_register_all(); |
109 |
- codec = avcodec_find_encoder(CODEC_ID_AC3); |
110 |
- if(!codec) |
111 |
---- configure.ac |
112 |
-+++ configure.ac |
113 |
-@@ -497,7 +497,7 @@ |
114 |
- AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library])) |
115 |
- |
116 |
- if test "x$with_external_ffmpeg" = "xyes"; then |
117 |
-- PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc]) |
118 |
-+ PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc libavutil]) |
119 |
- FFMPEG_FOLDER="" |
120 |
- FFMPEG_EXTERNALTEXT="External ffmpeg" |
121 |
- |
122 |
-@@ -515,10 +515,10 @@ |
123 |
- AC_MSG_RESULT($enable_ffmpeg_swscale) |
124 |
- if test x"$enable_ffmpeg_swscale" = xyes; then |
125 |
- dnl AC_DEFINE(HAVE_SWSCALER) |
126 |
-- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale]) |
127 |
-+ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale libavutil]) |
128 |
- FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I/usr/include/libavcodec -I/usr/include/libswscale -DHAVE_SWSCALER" |
129 |
- else |
130 |
-- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc]) |
131 |
-+ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libavutil]) |
132 |
- fi |
133 |
- FFMPEG_EXTERNALTEXT="External ffmpeg" |
134 |
- else |
135 |
---- quicktime/mpeg4.c |
136 |
-+++ quicktime/mpeg4.c |
137 |
-@@ -624,12 +624,12 @@ |
138 |
- else |
139 |
- // ffmpeg section |
140 |
- { |
141 |
-+ AVDictionary ** opts = NULL; |
142 |
- static char *video_rc_eq="tex^qComp"; |
143 |
- codec->encode_initialized[current_field] = 1; |
144 |
- if(!ffmpeg_initialized) |
145 |
- { |
146 |
- ffmpeg_initialized = 1; |
147 |
-- avcodec_init(); |
148 |
- avcodec_register_all(); |
149 |
- } |
150 |
- |
151 |
-@@ -673,8 +673,10 @@ |
152 |
- context->b_quant_offset = 1.25; |
153 |
- #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) |
154 |
- context->error_resilience = FF_ER_CAREFUL; |
155 |
--#else |
156 |
-+#elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0) |
157 |
- context->error_recognition = FF_ER_CAREFUL; |
158 |
-+#else |
159 |
-+ context->err_recognition |= AV_EF_CAREFUL; |
160 |
- #endif |
161 |
- context->error_concealment = 3; |
162 |
- context->frame_skip_cmp = FF_CMP_DCTMAX; |
163 |
-@@ -699,7 +701,7 @@ |
164 |
- context->profile= FF_PROFILE_UNKNOWN; |
165 |
- context->rc_buffer_aggressivity = 1.0; |
166 |
- context->level= FF_LEVEL_UNKNOWN; |
167 |
-- context->flags |= CODEC_FLAG_H263P_UMV; |
168 |
-+ av_dict_set(opts, "umv", "1", 0); |
169 |
- context->flags |= CODEC_FLAG_AC_PRED; |
170 |
- |
171 |
- // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg... |
172 |
-@@ -717,10 +719,8 @@ |
173 |
- (codec->ffmpeg_id == CODEC_ID_MPEG4 || |
174 |
- codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO || |
175 |
- codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO || |
176 |
-- codec->ffmpeg_id == CODEC_ID_H263P || |
177 |
-- codec->ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT)) |
178 |
-+ codec->ffmpeg_id == CODEC_ID_H263P )) |
179 |
- { |
180 |
-- avcodec_thread_init(context, file->cpus); |
181 |
- context->thread_count = file->cpus; |
182 |
- } |
183 |
- |
184 |
-@@ -740,7 +740,7 @@ |
185 |
- * codec->fix_bitrate, |
186 |
- * codec->quantizer); |
187 |
- */ |
188 |
-- avcodec_open(context, codec->encoder[current_field]); |
189 |
-+ avcodec_open2(context, codec->encoder[current_field], opts); |
190 |
- |
191 |
- avcodec_get_frame_defaults(&codec->picture[current_field]); |
192 |
- |
193 |
---- quicktime/qtffmpeg.c |
194 |
-+++ quicktime/qtffmpeg.c |
195 |
-@@ -54,7 +54,6 @@ |
196 |
- if(!ffmpeg_initialized) |
197 |
- { |
198 |
- ffmpeg_initialized = 1; |
199 |
-- avcodec_init(); |
200 |
- avcodec_register_all(); |
201 |
- } |
202 |
- |
203 |
-@@ -90,10 +89,8 @@ |
204 |
- (ffmpeg_id == CODEC_ID_MPEG4 || |
205 |
- ffmpeg_id == CODEC_ID_MPEG1VIDEO || |
206 |
- ffmpeg_id == CODEC_ID_MPEG2VIDEO || |
207 |
-- ffmpeg_id == CODEC_ID_H263P || |
208 |
-- ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT)) |
209 |
-+ ffmpeg_id == CODEC_ID_H263P )) |
210 |
- { |
211 |
-- avcodec_thread_init(context, cpus); |
212 |
- context->thread_count = cpus; |
213 |
- } |
214 |
- if(avcodec_open(context, |
215 |
---- quicktime/wma.c |
216 |
-+++ quicktime/wma.c |
217 |
-@@ -67,7 +67,6 @@ |
218 |
- if(!ffmpeg_initialized) |
219 |
- { |
220 |
- ffmpeg_initialized = 1; |
221 |
-- avcodec_init(); |
222 |
- avcodec_register_all(); |
223 |
- } |
224 |
- |
225 |
|
226 |
diff --git a/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch b/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch |
227 |
deleted file mode 100644 |
228 |
index a7dc74f2d44..00000000000 |
229 |
--- a/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch |
230 |
+++ /dev/null |
231 |
@@ -1,16 +0,0 @@ |
232 |
-http://bugs.gentoo.org/367509 |
233 |
- |
234 |
-pluginserver.C is using dlsym, dlopen, dlclose and dlerror |
235 |
- |
236 |
---- cinelerra/Makefile.am |
237 |
-+++ cinelerra/Makefile.am |
238 |
-@@ -692,7 +692,8 @@ |
239 |
- $(LIBDV_LIBS) \ |
240 |
- -luuid \ |
241 |
- $(MJPEG_LIBS) \ |
242 |
-- -lstdc++ |
243 |
-+ -lstdc++ \ |
244 |
-+ -ldl |
245 |
- |
246 |
- EXTRA_DIST = gen-feather-h |
247 |
- |
248 |
|
249 |
diff --git a/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch b/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch |
250 |
deleted file mode 100644 |
251 |
index 00621758663..00000000000 |
252 |
--- a/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch |
253 |
+++ /dev/null |
254 |
@@ -1,14 +0,0 @@ |
255 |
---- image/cinelerra-cv.desktop |
256 |
-+++ image/cinelerra-cv.desktop |
257 |
-@@ -5,9 +5,8 @@ |
258 |
- Name[fr]=Cinelerra-CV |
259 |
- Name[es]=Cinelerra-CV |
260 |
- Comment=Video Editor |
261 |
--Categories=Application;AudioVideo;Multimedia;VideoEditing; |
262 |
--Encoding=UTF-8 |
263 |
-+Categories=AudioVideo; |
264 |
- Exec=cinelerra |
265 |
--Icon=cinelerra-cv.xpm |
266 |
-+Icon=cinelerra-cv |
267 |
- Terminal=false |
268 |
- Type=Application |
269 |
|
270 |
diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg.patch b/media-video/cinelerra/files/cinelerra-ffmpeg.patch |
271 |
deleted file mode 100644 |
272 |
index 6f7962fb1a5..00000000000 |
273 |
--- a/media-video/cinelerra/files/cinelerra-ffmpeg.patch |
274 |
+++ /dev/null |
275 |
@@ -1,76 +0,0 @@ |
276 |
-Fix build with ffmpeg/libav trunk / 0.7 |
277 |
- |
278 |
-Index: cinelerra-20101104/cinelerra/ffmpeg.C |
279 |
-=================================================================== |
280 |
---- cinelerra-20101104.orig/cinelerra/ffmpeg.C |
281 |
-+++ cinelerra-20101104/cinelerra/ffmpeg.C |
282 |
-@@ -364,12 +364,15 @@ int FFMPEG::decode(uint8_t *data, long d |
283 |
- |
284 |
- // NOTE: frame must already have data space allocated |
285 |
- |
286 |
-+ AVPacket pkt; |
287 |
- got_picture = 0; |
288 |
-- int length = avcodec_decode_video(context, |
289 |
-+ av_init_packet( &pkt ); |
290 |
-+ pkt.data = data; |
291 |
-+ pkt.size = data_size; |
292 |
-+ int length = avcodec_decode_video2(context, |
293 |
- picture, |
294 |
- &got_picture, |
295 |
-- data, |
296 |
-- data_size); |
297 |
-+ &pkt); |
298 |
- |
299 |
- if (length < 0) { |
300 |
- printf("FFMPEG::decode error decoding frame\n"); |
301 |
-Index: cinelerra-20101104/quicktime/qtffmpeg.c |
302 |
-=================================================================== |
303 |
---- cinelerra-20101104.orig/quicktime/qtffmpeg.c |
304 |
-+++ cinelerra-20101104/quicktime/qtffmpeg.c |
305 |
-@@ -181,6 +181,7 @@ static int decode_wrapper(quicktime_t *f |
306 |
- |
307 |
- if(!result) |
308 |
- { |
309 |
-+ AVPacket pkt; |
310 |
- |
311 |
- |
312 |
- // No way to determine if there was an error based on nonzero status. |
313 |
-@@ -189,11 +190,13 @@ static int decode_wrapper(quicktime_t *f |
314 |
- ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */; |
315 |
- else |
316 |
- ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT; |
317 |
-- result = avcodec_decode_video(ffmpeg->decoder_context[current_field], |
318 |
-+ av_init_packet( &pkt ); |
319 |
-+ pkt.data = ffmpeg->work_buffer; |
320 |
-+ pkt.size = bytes + header_bytes; |
321 |
-+ result = avcodec_decode_video2(ffmpeg->decoder_context[current_field], |
322 |
- &ffmpeg->picture[current_field], |
323 |
- &got_picture, |
324 |
-- ffmpeg->work_buffer, |
325 |
-- bytes + header_bytes); |
326 |
-+ &pkt); |
327 |
- |
328 |
- |
329 |
- |
330 |
-Index: cinelerra-20101104/quicktime/wma.c |
331 |
-=================================================================== |
332 |
---- cinelerra-20101104.orig/quicktime/wma.c |
333 |
-+++ cinelerra-20101104/quicktime/wma.c |
334 |
-@@ -195,11 +195,14 @@ printf("decode 2 %x %llx %llx\n", chunk_ |
335 |
- chunk_size); |
336 |
- #else |
337 |
- bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; |
338 |
-- result = avcodec_decode_audio2(codec->decoder_context, |
339 |
-+ AVPacket pkt; |
340 |
-+ av_init_packet( &pkt ); |
341 |
-+ pkt.data = codec->packet_buffer; |
342 |
-+ pkt.size = chunk_size; |
343 |
-+ result = avcodec_decode_audio3(codec->decoder_context, |
344 |
- (int16_t*)(codec->work_buffer + codec->output_size * sample_size), |
345 |
- &bytes_decoded, |
346 |
-- codec->packet_buffer, |
347 |
-- chunk_size); |
348 |
-+ &pkt); |
349 |
- #endif |
350 |
- |
351 |
- pthread_mutex_unlock(&ffmpeg_lock); |
352 |
|
353 |
diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg2.patch b/media-video/cinelerra/files/cinelerra-ffmpeg2.patch |
354 |
deleted file mode 100644 |
355 |
index 01680ac952f..00000000000 |
356 |
--- a/media-video/cinelerra/files/cinelerra-ffmpeg2.patch |
357 |
+++ /dev/null |
358 |
@@ -1,218 +0,0 @@ |
359 |
-https://bugs.gentoo.org/show_bug.cgi?id=479394 |
360 |
-By Helmut Jarausch |
361 |
- |
362 |
---- cinelerra/ffmpeg.h.ORIG 2012-07-06 22:40:26.000000000 +0200 |
363 |
-+++ cinelerra/ffmpeg.h 2013-08-01 12:58:12.342474136 +0200 |
364 |
-@@ -26,7 +26,7 @@ |
365 |
- static int convert_cmodel_transfer(VFrame *frame_in,VFrame *frame_out); |
366 |
- static int init_picture_from_frame(AVPicture *picture, VFrame *frame); |
367 |
- |
368 |
-- static CodecID codec_id(char *codec_string); |
369 |
-+ static AVCodecID codec_id(char *codec_string); |
370 |
- |
371 |
- private: |
372 |
- static PixelFormat color_model_to_pix_fmt(int color_model); |
373 |
---- cinelerra/ffmpeg.C.ORIG 2013-08-01 11:24:43.794419246 +0200 |
374 |
-+++ cinelerra/ffmpeg.C 2013-08-01 12:57:48.121473899 +0200 |
375 |
-@@ -25,7 +25,7 @@ |
376 |
- |
377 |
- avcodec_register_all(); |
378 |
- |
379 |
-- CodecID id = codec_id(codec_string); |
380 |
-+ AVCodecID id = codec_id(codec_string); |
381 |
- codec = avcodec_find_decoder(id); |
382 |
- if (codec == NULL) { |
383 |
- printf("FFMPEG::init no decoder for '%s'", codec_string); |
384 |
-@@ -51,7 +51,7 @@ |
385 |
- } |
386 |
- |
387 |
- |
388 |
--CodecID FFMPEG::codec_id(char *codec_string) { |
389 |
-+AVCodecID FFMPEG::codec_id(char *codec_string) { |
390 |
- #define CODEC_IS(x) (! strncmp(codec_string, x, 4)) |
391 |
- |
392 |
- if (CODEC_IS(QUICKTIME_DV) || |
393 |
---- quicktime/ffmpeg/ffmpeg.c.ORIG 2012-07-06 22:40:26.000000000 +0200 |
394 |
-+++ quicktime/ffmpeg/ffmpeg.c 2013-08-01 12:57:59.025474005 +0200 |
395 |
-@@ -2663,7 +2663,7 @@ |
396 |
- return 0; |
397 |
- } |
398 |
- |
399 |
--static enum CodecID find_codec_or_die(const char *name, int type, int encoder) |
400 |
-+static enum AVCodecID find_codec_or_die(const char *name, int type, int encoder) |
401 |
- { |
402 |
- const char *codec_string = encoder ? "encoder" : "decoder"; |
403 |
- AVCodec *codec; |
404 |
---- quicktime/ffmpeg/libavformat/electronicarts.c.ORIG 2012-07-06 22:40:26.000000000 +0200 |
405 |
-+++ quicktime/ffmpeg/libavformat/electronicarts.c 2013-08-01 13:00:57.855475755 +0200 |
406 |
-@@ -49,11 +49,11 @@ |
407 |
- typedef struct EaDemuxContext { |
408 |
- int big_endian; |
409 |
- |
410 |
-- enum CodecID video_codec; |
411 |
-+ enum AVCodecID video_codec; |
412 |
- AVRational time_base; |
413 |
- int video_stream_index; |
414 |
- |
415 |
-- enum CodecID audio_codec; |
416 |
-+ enum AVCodecID audio_codec; |
417 |
- int audio_stream_index; |
418 |
- int audio_frame_counter; |
419 |
- |
420 |
---- quicktime/ffmpeg/libavformat/img2.c.ORIG 2012-07-06 22:40:26.000000000 +0200 |
421 |
-+++ quicktime/ffmpeg/libavformat/img2.c 2013-08-01 12:59:21.408474812 +0200 |
422 |
-@@ -34,7 +34,7 @@ |
423 |
- } VideoData; |
424 |
- |
425 |
- typedef struct { |
426 |
-- enum CodecID id; |
427 |
-+ enum AVCodecID id; |
428 |
- const char *str; |
429 |
- } IdStrMap; |
430 |
- |
431 |
-@@ -97,7 +97,7 @@ |
432 |
- } |
433 |
- return -1; |
434 |
- } |
435 |
--static enum CodecID av_str2id(const IdStrMap *tags, const char *str) |
436 |
-+static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str) |
437 |
- { |
438 |
- str= strrchr(str, '.'); |
439 |
- if(!str) return CODEC_ID_NONE; |
440 |
-@@ -175,7 +175,7 @@ |
441 |
- return 0; |
442 |
- } |
443 |
- |
444 |
--enum CodecID av_guess_image2_codec(const char *filename){ |
445 |
-+enum AVCodecID av_guess_image2_codec(const char *filename){ |
446 |
- return av_str2id(img_tags, filename); |
447 |
- } |
448 |
- |
449 |
---- quicktime/ffmpeg/libavformat/matroskadec.c.ORIG 2012-07-06 22:40:26.000000000 +0200 |
450 |
-+++ quicktime/ffmpeg/libavformat/matroskadec.c 2013-08-01 12:59:57.556475165 +0200 |
451 |
-@@ -2476,7 +2476,7 @@ |
452 |
- AVStream *st; |
453 |
- |
454 |
- for (i = 0; i < matroska->num_tracks; i++) { |
455 |
-- enum CodecID codec_id = CODEC_ID_NONE; |
456 |
-+ enum AVCodecID codec_id = CODEC_ID_NONE; |
457 |
- uint8_t *extradata = NULL; |
458 |
- int extradata_size = 0; |
459 |
- int extradata_offset = 0; |
460 |
-@@ -2495,7 +2495,7 @@ |
461 |
- } |
462 |
- } |
463 |
- |
464 |
-- /* Set the FourCC from the CodecID. */ |
465 |
-+ /* Set the FourCC from the AVCodecID. */ |
466 |
- /* This is the MS compatibility mode which stores a |
467 |
- * BITMAPINFOHEADER in the CodecPrivate. */ |
468 |
- if (!strcmp(track->codec_id, |
469 |
-@@ -2600,7 +2600,7 @@ |
470 |
- |
471 |
- if (codec_id == CODEC_ID_NONE) { |
472 |
- av_log(matroska->ctx, AV_LOG_INFO, |
473 |
-- "Unknown/unsupported CodecID %s.\n", |
474 |
-+ "Unknown/unsupported AVCodecID %s.\n", |
475 |
- track->codec_id); |
476 |
- } |
477 |
- |
478 |
---- quicktime/ffmpeg/libavformat/matroska.h.ORIG 2012-07-06 22:40:26.000000000 +0200 |
479 |
-+++ quicktime/ffmpeg/libavformat/matroska.h 2013-08-01 13:00:22.218475407 +0200 |
480 |
-@@ -220,12 +220,12 @@ |
481 |
- |
482 |
- typedef struct CodecTags{ |
483 |
- char str[16]; |
484 |
-- enum CodecID id; |
485 |
-+ enum AVCodecID id; |
486 |
- }CodecTags; |
487 |
- |
488 |
- typedef struct CodecMime{ |
489 |
- char str[32]; |
490 |
-- enum CodecID id; |
491 |
-+ enum AVCodecID id; |
492 |
- }CodecMime; |
493 |
- |
494 |
- #define MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC "V_MS/VFW/FOURCC" |
495 |
---- quicktime/ffmpeg/libavformat/mov.c.ORIG 2012-07-06 22:40:26.000000000 +0200 |
496 |
-+++ quicktime/ffmpeg/libavformat/mov.c 2013-08-01 12:59:33.935474934 +0200 |
497 |
-@@ -678,7 +678,7 @@ |
498 |
- |
499 |
- for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) { |
500 |
- //Parsing Sample description table |
501 |
-- enum CodecID id; |
502 |
-+ enum AVCodecID id; |
503 |
- int dref_id; |
504 |
- MOV_atom_t a = { 0, 0, 0 }; |
505 |
- offset_t start_pos = url_ftell(pb); |
506 |
---- quicktime/ffmpeg/libavformat/mxf.c.ORIG 2012-07-06 22:40:26.000000000 +0200 |
507 |
-+++ quicktime/ffmpeg/libavformat/mxf.c 2013-08-01 12:59:12.025474720 +0200 |
508 |
-@@ -157,7 +157,7 @@ |
509 |
- typedef struct { |
510 |
- UID uid; |
511 |
- unsigned matching_len; |
512 |
-- enum CodecID id; |
513 |
-+ enum AVCodecID id; |
514 |
- } MXFCodecUL; |
515 |
- |
516 |
- typedef struct { |
517 |
---- quicktime/ffmpeg/libavformat/riff.h.ORIG 2012-07-06 22:40:26.000000000 +0200 |
518 |
-+++ quicktime/ffmpeg/libavformat/riff.h 2013-08-01 12:59:45.950475052 +0200 |
519 |
-@@ -48,7 +48,7 @@ |
520 |
- extern const AVCodecTag codec_wav_tags[]; |
521 |
- |
522 |
- unsigned int codec_get_tag(const AVCodecTag *tags, int id); |
523 |
--enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag); |
524 |
-+enum AVCodecID codec_get_id(const AVCodecTag *tags, unsigned int tag); |
525 |
- void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale); |
526 |
- |
527 |
- #endif /* FFMPEG_RIFF_H */ |
528 |
---- quicktime/ffmpeg/libavformat/rtp.c.ORIG 2012-07-06 22:40:26.000000000 +0200 |
529 |
-+++ quicktime/ffmpeg/libavformat/rtp.c 2013-08-01 12:59:01.778474619 +0200 |
530 |
-@@ -40,7 +40,7 @@ |
531 |
- int pt; |
532 |
- const char enc_name[6]; |
533 |
- enum CodecType codec_type; |
534 |
-- enum CodecID codec_id; |
535 |
-+ enum AVCodecID codec_id; |
536 |
- int clock_rate; |
537 |
- int audio_channels; |
538 |
- } AVRtpPayloadTypes[]= |
539 |
-@@ -120,7 +120,7 @@ |
540 |
- return ""; |
541 |
- } |
542 |
- |
543 |
--enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type) |
544 |
-+enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type) |
545 |
- { |
546 |
- int i; |
547 |
- |
548 |
---- quicktime/ffmpeg/libavformat/rtp_internal.h.ORIG 2012-07-06 22:40:26.000000000 +0200 |
549 |
-+++ quicktime/ffmpeg/libavformat/rtp_internal.h 2013-08-01 13:00:09.147475279 +0200 |
550 |
-@@ -61,7 +61,7 @@ |
551 |
- // fields from AVRtpDynamicPayloadType_s |
552 |
- const char enc_name[50]; /* XXX: still why 50 ? ;-) */ |
553 |
- enum CodecType codec_type; |
554 |
-- enum CodecID codec_id; |
555 |
-+ enum AVCodecID codec_id; |
556 |
- |
557 |
- // may be null |
558 |
- int (*parse_sdp_a_line) (AVStream * stream, |
559 |
-@@ -123,7 +123,7 @@ |
560 |
- |
561 |
- void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m); |
562 |
- const char *ff_rtp_enc_name(int payload_type); |
563 |
--enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type); |
564 |
-+enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type); |
565 |
- |
566 |
- void av_register_rtp_dynamic_payload_handlers(void); |
567 |
- |
568 |
---- quicktime/wma.h.ORIG 2012-07-06 22:40:26.000000000 +0200 |
569 |
-+++ quicktime/wma.h 2013-08-01 13:11:46.431482103 +0200 |
570 |
-@@ -3,5 +3,6 @@ |
571 |
- |
572 |
- extern void quicktime_init_codec_wmav1(quicktime_audio_map_t *); |
573 |
- extern void quicktime_init_codec_wmav2(quicktime_audio_map_t *); |
574 |
-+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 |
575 |
- |
576 |
- #endif |
577 |
|
578 |
diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg29.patch b/media-video/cinelerra/files/cinelerra-ffmpeg29.patch |
579 |
deleted file mode 100644 |
580 |
index 604000eff38..00000000000 |
581 |
--- a/media-video/cinelerra/files/cinelerra-ffmpeg29.patch |
582 |
+++ /dev/null |
583 |
@@ -1,658 +0,0 @@ |
584 |
-Index: cinelerra-20140710/cinelerra/ffmpeg.C |
585 |
-=================================================================== |
586 |
---- cinelerra-20140710.orig/cinelerra/ffmpeg.C |
587 |
-+++ cinelerra-20140710/cinelerra/ffmpeg.C |
588 |
-@@ -38,7 +38,7 @@ int FFMPEG::init(char *codec_string) { |
589 |
- printf("FFMPEG::init avcodec_open() failed\n"); |
590 |
- } |
591 |
- |
592 |
-- picture = avcodec_alloc_frame(); |
593 |
-+ picture = av_frame_alloc(); |
594 |
- |
595 |
- |
596 |
- return 0; |
597 |
-@@ -55,62 +55,62 @@ AVCodecID FFMPEG::codec_id(char *codec_s |
598 |
- #define CODEC_IS(x) (! strncmp(codec_string, x, 4)) |
599 |
- |
600 |
- if (CODEC_IS(QUICKTIME_DV) || |
601 |
-- CODEC_IS(QUICKTIME_DVSD)) return CODEC_ID_DVVIDEO; |
602 |
-+ CODEC_IS(QUICKTIME_DVSD)) return AV_CODEC_ID_DVVIDEO; |
603 |
- |
604 |
- if (CODEC_IS(QUICKTIME_MP4V) || |
605 |
-- CODEC_IS(QUICKTIME_DIVX)) return CODEC_ID_MPEG4; |
606 |
-+ CODEC_IS(QUICKTIME_DIVX)) return AV_CODEC_ID_MPEG4; |
607 |
- |
608 |
-- return CODEC_ID_NONE; |
609 |
-+ return AV_CODEC_ID_NONE; |
610 |
- |
611 |
- #undef CODEC_IS |
612 |
- } |
613 |
- |
614 |
--PixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) { |
615 |
-+AVPixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) { |
616 |
- switch (color_model) |
617 |
- { |
618 |
- case BC_YUV422: |
619 |
-- return PIX_FMT_YUYV422; |
620 |
-+ return AV_PIX_FMT_YUYV422; |
621 |
- case BC_RGB888: |
622 |
-- return PIX_FMT_RGB24; |
623 |
-+ return AV_PIX_FMT_RGB24; |
624 |
- case BC_BGR8888: // NOTE: order flipped |
625 |
-- return PIX_FMT_RGB32; |
626 |
-+ return AV_PIX_FMT_RGB32; |
627 |
- case BC_BGR888: |
628 |
-- return PIX_FMT_BGR24; |
629 |
-+ return AV_PIX_FMT_BGR24; |
630 |
- case BC_YUV420P: |
631 |
-- return PIX_FMT_YUV420P; |
632 |
-+ return AV_PIX_FMT_YUV420P; |
633 |
- case BC_YUV422P: |
634 |
-- return PIX_FMT_YUV422P; |
635 |
-+ return AV_PIX_FMT_YUV422P; |
636 |
- case BC_YUV444P: |
637 |
-- return PIX_FMT_YUV444P; |
638 |
-+ return AV_PIX_FMT_YUV444P; |
639 |
- case BC_YUV411P: |
640 |
-- return PIX_FMT_YUV411P; |
641 |
-+ return AV_PIX_FMT_YUV411P; |
642 |
- case BC_RGB565: |
643 |
-- return PIX_FMT_RGB565; |
644 |
-+ return AV_PIX_FMT_RGB565; |
645 |
- }; |
646 |
- |
647 |
-- return PIX_FMT_NB; |
648 |
-+ return AV_PIX_FMT_NB; |
649 |
- } |
650 |
- |
651 |
--int FFMPEG::pix_fmt_to_color_model(PixelFormat pix_fmt) { |
652 |
-+int FFMPEG::pix_fmt_to_color_model(AVPixelFormat pix_fmt) { |
653 |
- switch (pix_fmt) |
654 |
- { |
655 |
-- case PIX_FMT_YUYV422: |
656 |
-+ case AV_PIX_FMT_YUYV422: |
657 |
- return BC_YUV422; |
658 |
-- case PIX_FMT_RGB24: |
659 |
-+ case AV_PIX_FMT_RGB24: |
660 |
- return BC_RGB888; |
661 |
-- case PIX_FMT_RGB32: |
662 |
-+ case AV_PIX_FMT_RGB32: |
663 |
- return BC_BGR8888; |
664 |
-- case PIX_FMT_BGR24: |
665 |
-+ case AV_PIX_FMT_BGR24: |
666 |
- return BC_BGR888; |
667 |
-- case PIX_FMT_YUV420P: |
668 |
-+ case AV_PIX_FMT_YUV420P: |
669 |
- return BC_YUV420P; |
670 |
-- case PIX_FMT_YUV422P: |
671 |
-+ case AV_PIX_FMT_YUV422P: |
672 |
- return BC_YUV422P; |
673 |
-- case PIX_FMT_YUV444P: |
674 |
-+ case AV_PIX_FMT_YUV444P: |
675 |
- return BC_YUV444P; |
676 |
-- case PIX_FMT_YUV411P: |
677 |
-+ case AV_PIX_FMT_YUV411P: |
678 |
- return BC_YUV411P; |
679 |
-- case PIX_FMT_RGB565: |
680 |
-+ case AV_PIX_FMT_RGB565: |
681 |
- return BC_RGB565; |
682 |
- }; |
683 |
- |
684 |
-@@ -119,7 +119,7 @@ int FFMPEG::pix_fmt_to_color_model(Pixel |
685 |
- |
686 |
- int FFMPEG::init_picture_from_frame(AVPicture *picture, VFrame *frame) { |
687 |
- int cmodel = frame->get_color_model(); |
688 |
-- PixelFormat pix_fmt = color_model_to_pix_fmt(cmodel); |
689 |
-+ AVPixelFormat pix_fmt = color_model_to_pix_fmt(cmodel); |
690 |
- |
691 |
- int size = avpicture_fill(picture, frame->get_data(), pix_fmt, |
692 |
- frame->get_w(), frame->get_h()); |
693 |
-@@ -142,16 +142,16 @@ int FFMPEG::init_picture_from_frame(AVPi |
694 |
- |
695 |
- int FFMPEG::convert_cmodel(VFrame *frame_in, VFrame *frame_out) { |
696 |
- |
697 |
-- PixelFormat pix_fmt_in = |
698 |
-+ AVPixelFormat pix_fmt_in = |
699 |
- color_model_to_pix_fmt(frame_in->get_color_model()); |
700 |
-- PixelFormat pix_fmt_out = |
701 |
-+ AVPixelFormat pix_fmt_out = |
702 |
- color_model_to_pix_fmt(frame_out->get_color_model()); |
703 |
- #ifdef HAVE_SWSCALER |
704 |
- // We need a context for swscale |
705 |
- struct SwsContext *convert_ctx; |
706 |
- #endif |
707 |
- // do conversion within libavcodec if possible |
708 |
-- if (pix_fmt_in != PIX_FMT_NB && pix_fmt_out != PIX_FMT_NB) { |
709 |
-+ if (pix_fmt_in != AV_PIX_FMT_NB && pix_fmt_out != AV_PIX_FMT_NB) { |
710 |
- // set up a temporary pictures from frame_in and frame_out |
711 |
- AVPicture picture_in, picture_out; |
712 |
- init_picture_from_frame(&picture_in, frame_in); |
713 |
-@@ -226,14 +226,14 @@ int FFMPEG::convert_cmodel_transfer(VFra |
714 |
- } |
715 |
- |
716 |
- |
717 |
--int FFMPEG::convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt_in, |
718 |
-+int FFMPEG::convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt_in, |
719 |
- int width_in, int height_in, VFrame *frame_out) { |
720 |
- |
721 |
- // set up a temporary picture_out from frame_out |
722 |
- AVPicture picture_out; |
723 |
- init_picture_from_frame(&picture_out, frame_out); |
724 |
- int cmodel_out = frame_out->get_color_model(); |
725 |
-- PixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out); |
726 |
-+ AVPixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out); |
727 |
- |
728 |
- #ifdef HAVE_SWSCALER |
729 |
- // We need a context for swscale |
730 |
-@@ -242,7 +242,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi |
731 |
- int result; |
732 |
- #ifndef HAVE_SWSCALER |
733 |
- // do conversion within libavcodec if possible |
734 |
-- if (pix_fmt_out != PIX_FMT_NB) { |
735 |
-+ if (pix_fmt_out != AV_PIX_FMT_NB) { |
736 |
- result = img_convert(&picture_out, |
737 |
- pix_fmt_out, |
738 |
- picture_in, |
739 |
-@@ -280,7 +280,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi |
740 |
- // make an intermediate temp frame only if necessary |
741 |
- int cmodel_in = pix_fmt_to_color_model(pix_fmt_in); |
742 |
- if (cmodel_in == BC_TRANSPARENCY) { |
743 |
-- if (pix_fmt_in == PIX_FMT_RGB32) { |
744 |
-+ if (pix_fmt_in == AV_PIX_FMT_RGB32) { |
745 |
- // avoid infinite recursion if things are broken |
746 |
- printf("FFMPEG::convert_cmodel pix_fmt_in broken!\n"); |
747 |
- return 1; |
748 |
-Index: cinelerra-20140710/cinelerra/ffmpeg.h |
749 |
-=================================================================== |
750 |
---- cinelerra-20140710.orig/cinelerra/ffmpeg.h |
751 |
-+++ cinelerra-20140710/cinelerra/ffmpeg.h |
752 |
-@@ -18,7 +18,7 @@ class FFMPEG |
753 |
- int init(char *codec_string); |
754 |
- int decode(uint8_t *data, long data_size, VFrame *frame_out); |
755 |
- |
756 |
-- static int convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt, |
757 |
-+ static int convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt, |
758 |
- int width_in, int height_in, |
759 |
- VFrame *frame_out); |
760 |
- static int convert_cmodel(VFrame *frame_in, VFrame *frame_out); |
761 |
-@@ -29,8 +29,8 @@ class FFMPEG |
762 |
- static AVCodecID codec_id(char *codec_string); |
763 |
- |
764 |
- private: |
765 |
-- static PixelFormat color_model_to_pix_fmt(int color_model); |
766 |
-- static int pix_fmt_to_color_model(PixelFormat pix_fmt); |
767 |
-+ static AVPixelFormat color_model_to_pix_fmt(int color_model); |
768 |
-+ static int pix_fmt_to_color_model(AVPixelFormat pix_fmt); |
769 |
- |
770 |
- int got_picture; |
771 |
- Asset *asset; |
772 |
-Index: cinelerra-20140710/cinelerra/fileac3.C |
773 |
-=================================================================== |
774 |
---- cinelerra-20140710.orig/cinelerra/fileac3.C |
775 |
-+++ cinelerra-20140710/cinelerra/fileac3.C |
776 |
-@@ -85,7 +85,7 @@ int FileAC3::open_file(int rd, int wr) |
777 |
- if(wr) |
778 |
- { |
779 |
- avcodec_register_all(); |
780 |
-- codec = avcodec_find_encoder(CODEC_ID_AC3); |
781 |
-+ codec = avcodec_find_encoder(AV_CODEC_ID_AC3); |
782 |
- if(!codec) |
783 |
- { |
784 |
- eprintf("codec not found.\n"); |
785 |
-@@ -211,12 +211,56 @@ int FileAC3::write_samples(double **buff |
786 |
- current_sample + frame_size <= temp_raw_size; |
787 |
- current_sample += frame_size) |
788 |
- { |
789 |
-- int compressed_size = avcodec_encode_audio( |
790 |
-- codec_context, |
791 |
-- temp_compressed + output_size, |
792 |
-- compressed_allocated - output_size, |
793 |
-- temp_raw + current_sample * asset->channels); |
794 |
-- output_size += compressed_size; |
795 |
-+ AVPacket pkt; |
796 |
-+ AVFrame *frame; |
797 |
-+ int ret, samples_size, got_packet; |
798 |
-+ av_init_packet(&pkt); |
799 |
-+ pkt.data = temp_compressed + output_size; |
800 |
-+ pkt.size = compressed_allocated - output_size; |
801 |
-+ frame = av_frame_alloc(); |
802 |
-+ if(!frame) return AVERROR(ENOMEM); |
803 |
-+ if(codec_context->frame_size) { |
804 |
-+ frame->nb_samples = codec_context->frame_size; |
805 |
-+ } else { |
806 |
-+ /* if frame_size is not set, the number of samples must be |
807 |
-+ * * calculated from the buffer size */ |
808 |
-+ int64_t nb_samples; |
809 |
-+ if (!av_get_bits_per_sample(codec_context->codec_id)) { |
810 |
-+ av_frame_free(&frame); |
811 |
-+ return AVERROR(EINVAL); |
812 |
-+ } |
813 |
-+ nb_samples = (int64_t)(compressed_allocated - output_size) * 8 / |
814 |
-+ (av_get_bits_per_sample(codec_context->codec_id) * |
815 |
-+ codec_context->channels); |
816 |
-+ if (nb_samples >= INT_MAX) { |
817 |
-+ av_frame_free(&frame); |
818 |
-+ return AVERROR(EINVAL); |
819 |
-+ } |
820 |
-+ frame->nb_samples = nb_samples; |
821 |
-+ } |
822 |
-+ |
823 |
-+ /* it is assumed that the samples buffer is large enough based on the |
824 |
-+ * * relevant parameters */ |
825 |
-+ samples_size = av_samples_get_buffer_size(NULL, codec_context->channels, |
826 |
-+ frame->nb_samples, |
827 |
-+ codec_context->sample_fmt, 1); |
828 |
-+ if ((ret = avcodec_fill_audio_frame(frame, codec_context->channels, |
829 |
-+ codec_context->sample_fmt, |
830 |
-+ (const uint8_t *)(temp_raw + current_sample * asset->channels), |
831 |
-+ samples_size, 1)) < 0) { |
832 |
-+ av_frame_free(&frame); |
833 |
-+ return ret; |
834 |
-+ } |
835 |
-+ |
836 |
-+ ret = avcodec_encode_audio2(codec_context, &pkt, frame, &got_packet); |
837 |
-+ output_size += pkt.size; |
838 |
-+ /* free any side data since we cannot return it */ |
839 |
-+ av_packet_free_side_data(&pkt); |
840 |
-+ |
841 |
-+ if (frame && frame->extended_data != frame->data) |
842 |
-+ av_freep(&frame->extended_data); |
843 |
-+ |
844 |
-+ av_frame_free(&frame); |
845 |
- } |
846 |
- |
847 |
- // Shift buffer back |
848 |
-Index: cinelerra-20140710/quicktime/mpeg4.c |
849 |
-=================================================================== |
850 |
---- cinelerra-20140710.orig/quicktime/mpeg4.c |
851 |
-+++ cinelerra-20140710/quicktime/mpeg4.c |
852 |
-@@ -595,7 +595,7 @@ static int encode(quicktime_t *file, uns |
853 |
- if(!codec->encode_initialized[current_field]) |
854 |
- { |
855 |
- // Encore section |
856 |
-- if(codec->ffmpeg_id == CODEC_ID_MPEG4 && codec->use_encore) |
857 |
-+ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 && codec->use_encore) |
858 |
- { |
859 |
- codec->encode_initialized[current_field] = 1; |
860 |
- codec->encode_handle[current_field] = encode_handle++; |
861 |
-@@ -647,7 +647,7 @@ static int encode(quicktime_t *file, uns |
862 |
- context->width = width_i; |
863 |
- context->height = height_i; |
864 |
- context->gop_size = codec->gop_size; |
865 |
-- context->pix_fmt = PIX_FMT_YUV420P; |
866 |
-+ context->pix_fmt = AV_PIX_FMT_YUV420P; |
867 |
- context->bit_rate = codec->bitrate / codec->total_fields; |
868 |
- context->bit_rate_tolerance = codec->bitrate_tolerance; |
869 |
- context->rc_eq = video_rc_eq; |
870 |
-@@ -705,19 +705,19 @@ static int encode(quicktime_t *file, uns |
871 |
- // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg... |
872 |
- |
873 |
- // Copyed from ffmpeg's mpegvideo.c... set 4MV only where it is supported |
874 |
-- if(codec->ffmpeg_id == CODEC_ID_MPEG4 || |
875 |
-- codec->ffmpeg_id == CODEC_ID_H263 || |
876 |
-- codec->ffmpeg_id == CODEC_ID_H263P || |
877 |
-- codec->ffmpeg_id == CODEC_ID_FLV1) |
878 |
-+ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 || |
879 |
-+ codec->ffmpeg_id == AV_CODEC_ID_H263 || |
880 |
-+ codec->ffmpeg_id == AV_CODEC_ID_H263P || |
881 |
-+ codec->ffmpeg_id == AV_CODEC_ID_FLV1) |
882 |
- context->flags |= CODEC_FLAG_4MV; |
883 |
- // Not compatible with Win |
884 |
- // context->flags |= CODEC_FLAG_QPEL; |
885 |
- |
886 |
- if(file->cpus > 1 && |
887 |
-- (codec->ffmpeg_id == CODEC_ID_MPEG4 || |
888 |
-- codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO || |
889 |
-- codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO || |
890 |
-- codec->ffmpeg_id == CODEC_ID_H263P )) |
891 |
-+ (codec->ffmpeg_id == AV_CODEC_ID_MPEG4 || |
892 |
-+ codec->ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO || |
893 |
-+ codec->ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO || |
894 |
-+ codec->ffmpeg_id == AV_CODEC_ID_H263P )) |
895 |
- { |
896 |
- context->thread_count = file->cpus; |
897 |
- } |
898 |
-@@ -740,7 +740,7 @@ static int encode(quicktime_t *file, uns |
899 |
- */ |
900 |
- avcodec_open2(context, codec->encoder[current_field], opts); |
901 |
- |
902 |
-- avcodec_get_frame_defaults(&codec->picture[current_field]); |
903 |
-+ av_frame_unref(&codec->picture[current_field]); |
904 |
- |
905 |
- } |
906 |
- } |
907 |
-@@ -891,10 +891,18 @@ static int encode(quicktime_t *file, uns |
908 |
- picture->quality = 0; |
909 |
- picture->pts = vtrack->current_position * quicktime_frame_rate_d(file, track); |
910 |
- picture->key_frame = 0; |
911 |
-- bytes = avcodec_encode_video(context, |
912 |
-- codec->work_buffer, |
913 |
-- codec->buffer_size, |
914 |
-- picture); |
915 |
-+ |
916 |
-+ AVPacket pkt; |
917 |
-+ int ret, got_pkt; |
918 |
-+ av_init_packet(&pkt); |
919 |
-+ pkt.data = codec->work_buffer; |
920 |
-+ pkt.size = codec->buffer_size; |
921 |
-+ ret = avcodec_encode_video2(context, |
922 |
-+ &pkt, |
923 |
-+ picture, &got_pkt); |
924 |
-+ bytes = pkt.size; |
925 |
-+ if(ret < 0 || !got_pkt) return 1; |
926 |
-+ |
927 |
- is_keyframe = context->coded_frame && context->coded_frame->key_frame; |
928 |
- /* |
929 |
- * printf("encode current_position=%d is_keyframe=%d\n", |
930 |
-@@ -1161,7 +1169,7 @@ void quicktime_init_codec_div3(quicktime |
931 |
- QUICKTIME_DIV3, |
932 |
- "DIVX", |
933 |
- "Mike Row Soft MPEG4 Version 3"); |
934 |
-- result->ffmpeg_id = CODEC_ID_MSMPEG4V3; |
935 |
-+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3; |
936 |
- } |
937 |
- |
938 |
- void quicktime_init_codec_div5(quicktime_video_map_t *vtrack) |
939 |
-@@ -1170,7 +1178,7 @@ void quicktime_init_codec_div5(quicktime |
940 |
- QUICKTIME_DX50, |
941 |
- "DIVX", |
942 |
- "Mike Row Soft MPEG4 Version 5"); |
943 |
-- result->ffmpeg_id = CODEC_ID_MPEG4; |
944 |
-+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; |
945 |
- } |
946 |
- |
947 |
- // Mike Rowe Soft MPEG-4 |
948 |
-@@ -1180,7 +1188,7 @@ void quicktime_init_codec_div3lower(quic |
949 |
- QUICKTIME_DIV3_LOWER, |
950 |
- "DIVX", |
951 |
- "Mike Row Soft MPEG4 Version 3"); |
952 |
-- result->ffmpeg_id = CODEC_ID_MSMPEG4V3; |
953 |
-+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3; |
954 |
- } |
955 |
- |
956 |
- void quicktime_init_codec_div3v2(quicktime_video_map_t *vtrack) |
957 |
-@@ -1189,7 +1197,7 @@ void quicktime_init_codec_div3v2(quickti |
958 |
- QUICKTIME_MP42, |
959 |
- "MP42", |
960 |
- "Mike Row Soft MPEG4 Version 2"); |
961 |
-- result->ffmpeg_id = CODEC_ID_MSMPEG4V2; |
962 |
-+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V2; |
963 |
- } |
964 |
- |
965 |
- // Generic MPEG-4 |
966 |
-@@ -1199,7 +1207,7 @@ void quicktime_init_codec_divx(quicktime |
967 |
- QUICKTIME_DIVX, |
968 |
- "MPEG-4", |
969 |
- "Generic MPEG Four"); |
970 |
-- result->ffmpeg_id = CODEC_ID_MPEG4; |
971 |
-+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; |
972 |
- result->use_encore = 1; |
973 |
- } |
974 |
- |
975 |
-@@ -1209,7 +1217,7 @@ void quicktime_init_codec_mpg4(quicktime |
976 |
- QUICKTIME_MPG4, |
977 |
- "MPEG-4", |
978 |
- "FFMPEG (msmpeg4)"); |
979 |
-- result->ffmpeg_id = CODEC_ID_MSMPEG4V1; |
980 |
-+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V1; |
981 |
- } |
982 |
- |
983 |
- void quicktime_init_codec_dx50(quicktime_video_map_t *vtrack) |
984 |
-@@ -1218,7 +1226,7 @@ void quicktime_init_codec_dx50(quicktime |
985 |
- QUICKTIME_DX50, |
986 |
- "MPEG-4", |
987 |
- "FFMPEG (mpeg4)"); |
988 |
-- result->ffmpeg_id = CODEC_ID_MPEG4; |
989 |
-+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; |
990 |
- } |
991 |
- |
992 |
- // Generic MPEG-4 |
993 |
-@@ -1228,7 +1236,7 @@ void quicktime_init_codec_mp4v(quicktime |
994 |
- QUICKTIME_MP4V, |
995 |
- "MPEG4", |
996 |
- "Generic MPEG Four"); |
997 |
-- result->ffmpeg_id = CODEC_ID_MPEG4; |
998 |
-+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; |
999 |
- // result->use_encore = 1; |
1000 |
- } |
1001 |
- |
1002 |
-@@ -1240,7 +1248,7 @@ void quicktime_init_codec_svq1(quicktime |
1003 |
- QUICKTIME_SVQ1, |
1004 |
- "Sorenson Version 1", |
1005 |
- "From the chearch of codecs of yesterday's sights"); |
1006 |
-- result->ffmpeg_id = CODEC_ID_SVQ1; |
1007 |
-+ result->ffmpeg_id = AV_CODEC_ID_SVQ1; |
1008 |
- } |
1009 |
- |
1010 |
- void quicktime_init_codec_svq3(quicktime_video_map_t *vtrack) |
1011 |
-@@ -1249,7 +1257,7 @@ void quicktime_init_codec_svq3(quicktime |
1012 |
- QUICKTIME_SVQ3, |
1013 |
- "Sorenson Version 3", |
1014 |
- "From the chearch of codecs of yesterday's sights"); |
1015 |
-- result->ffmpeg_id = CODEC_ID_SVQ3; |
1016 |
-+ result->ffmpeg_id = AV_CODEC_ID_SVQ3; |
1017 |
- } |
1018 |
- |
1019 |
- void quicktime_init_codec_h263(quicktime_video_map_t *vtrack) |
1020 |
-@@ -1258,7 +1266,7 @@ void quicktime_init_codec_h263(quicktime |
1021 |
- QUICKTIME_H263, |
1022 |
- "H.263", |
1023 |
- "H.263"); |
1024 |
-- result->ffmpeg_id = CODEC_ID_H263; |
1025 |
-+ result->ffmpeg_id = AV_CODEC_ID_H263; |
1026 |
- } |
1027 |
- |
1028 |
- void quicktime_init_codec_xvid(quicktime_video_map_t *vtrack) |
1029 |
-@@ -1267,7 +1275,7 @@ void quicktime_init_codec_xvid(quicktime |
1030 |
- QUICKTIME_XVID, |
1031 |
- "XVID", |
1032 |
- "FFmpeg MPEG-4"); |
1033 |
-- result->ffmpeg_id = CODEC_ID_MPEG4; |
1034 |
-+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; |
1035 |
- } |
1036 |
- |
1037 |
- void quicktime_init_codec_dnxhd(quicktime_video_map_t *vtrack) |
1038 |
-@@ -1276,7 +1284,7 @@ void quicktime_init_codec_dnxhd(quicktim |
1039 |
- QUICKTIME_DNXHD, |
1040 |
- "DNXHD", |
1041 |
- "DNXHD"); |
1042 |
-- result->ffmpeg_id = CODEC_ID_DNXHD; |
1043 |
-+ result->ffmpeg_id = AV_CODEC_ID_DNXHD; |
1044 |
- } |
1045 |
- |
1046 |
- // field based MPEG-4 |
1047 |
-@@ -1287,7 +1295,7 @@ void quicktime_init_codec_hv60(quicktime |
1048 |
- "Dual MPEG-4", |
1049 |
- "MPEG 4 with alternating streams every other frame. (Not standardized)"); |
1050 |
- result->total_fields = 2; |
1051 |
-- result->ffmpeg_id = CODEC_ID_MPEG4; |
1052 |
-+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; |
1053 |
- } |
1054 |
- |
1055 |
- |
1056 |
-Index: cinelerra-20140710/quicktime/qtffmpeg.c |
1057 |
-=================================================================== |
1058 |
---- cinelerra-20140710.orig/quicktime/qtffmpeg.c |
1059 |
-+++ cinelerra-20140710/quicktime/qtffmpeg.c |
1060 |
-@@ -39,7 +39,7 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg |
1061 |
- ptr->height = h; |
1062 |
- ptr->ffmpeg_id = ffmpeg_id; |
1063 |
- //printf("quicktime_new_ffmpeg 1 %d\n", ptr->ffmpeg_id); |
1064 |
-- if(ffmpeg_id == CODEC_ID_SVQ1) |
1065 |
-+ if(ffmpeg_id == AV_CODEC_ID_SVQ1) |
1066 |
- { |
1067 |
- ptr->width_i = quicktime_quantize32(ptr->width); |
1068 |
- ptr->height_i = quicktime_quantize32(ptr->height); |
1069 |
-@@ -86,10 +86,10 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg |
1070 |
- context->extradata_size = avcc->data_size; |
1071 |
- } |
1072 |
- if(cpus > 1 && |
1073 |
-- (ffmpeg_id == CODEC_ID_MPEG4 || |
1074 |
-- ffmpeg_id == CODEC_ID_MPEG1VIDEO || |
1075 |
-- ffmpeg_id == CODEC_ID_MPEG2VIDEO || |
1076 |
-- ffmpeg_id == CODEC_ID_H263P )) |
1077 |
-+ (ffmpeg_id == AV_CODEC_ID_MPEG4 || |
1078 |
-+ ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO || |
1079 |
-+ ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO || |
1080 |
-+ ffmpeg_id == AV_CODEC_ID_H263P )) |
1081 |
- { |
1082 |
- context->thread_count = cpus; |
1083 |
- } |
1084 |
-@@ -224,16 +224,16 @@ static int get_chroma_factor(quicktime_f |
1085 |
- { |
1086 |
- switch(ffmpeg->decoder_context[current_field]->pix_fmt) |
1087 |
- { |
1088 |
-- case PIX_FMT_YUV420P: |
1089 |
-+ case AV_PIX_FMT_YUV420P: |
1090 |
- return 4; |
1091 |
- break; |
1092 |
-- case PIX_FMT_YUYV422: |
1093 |
-+ case AV_PIX_FMT_YUYV422: |
1094 |
- return 2; |
1095 |
- break; |
1096 |
-- case PIX_FMT_YUV422P: |
1097 |
-+ case AV_PIX_FMT_YUV422P: |
1098 |
- return 2; |
1099 |
- break; |
1100 |
-- case PIX_FMT_YUV410P: |
1101 |
-+ case AV_PIX_FMT_YUV410P: |
1102 |
- return 9; |
1103 |
- break; |
1104 |
- default: |
1105 |
-@@ -277,7 +277,7 @@ int quicktime_ffmpeg_decode(quicktime_ff |
1106 |
- //printf("quicktime_ffmpeg_decode 1 %d\n", ffmpeg->last_frame[current_field]); |
1107 |
- |
1108 |
- if(ffmpeg->last_frame[current_field] == -1 && |
1109 |
-- ffmpeg->ffmpeg_id != CODEC_ID_H264) |
1110 |
-+ ffmpeg->ffmpeg_id != AV_CODEC_ID_H264) |
1111 |
- { |
1112 |
- int current_frame = vtrack->current_position; |
1113 |
- // For certain codecs, |
1114 |
-@@ -328,7 +328,7 @@ int quicktime_ffmpeg_decode(quicktime_ff |
1115 |
- // For MPEG-4, get another keyframe before first keyframe. |
1116 |
- // The Sanyo tends to glitch with only 1 keyframe. |
1117 |
- // Not enough memory. |
1118 |
-- if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == CODEC_ID_MPEG4 */) |
1119 |
-+ if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == AV_CODEC_ID_MPEG4 */) |
1120 |
- { |
1121 |
- do |
1122 |
- { |
1123 |
-@@ -423,16 +423,16 @@ int quicktime_ffmpeg_decode(quicktime_ff |
1124 |
- // Hopefully this setting will be left over if the cache was used. |
1125 |
- switch(ffmpeg->decoder_context[current_field]->pix_fmt) |
1126 |
- { |
1127 |
-- case PIX_FMT_YUV420P: |
1128 |
-+ case AV_PIX_FMT_YUV420P: |
1129 |
- input_cmodel = BC_YUV420P; |
1130 |
- break; |
1131 |
-- case PIX_FMT_YUYV422: |
1132 |
-+ case AV_PIX_FMT_YUYV422: |
1133 |
- input_cmodel = BC_YUV422; |
1134 |
- break; |
1135 |
-- case PIX_FMT_YUV422P: |
1136 |
-+ case AV_PIX_FMT_YUV422P: |
1137 |
- input_cmodel = BC_YUV422P; |
1138 |
- break; |
1139 |
-- case PIX_FMT_YUV410P: |
1140 |
-+ case AV_PIX_FMT_YUV410P: |
1141 |
- input_cmodel = BC_YUV9P; |
1142 |
- break; |
1143 |
- default: |
1144 |
-Index: cinelerra-20140710/quicktime/qth264.c |
1145 |
-=================================================================== |
1146 |
---- cinelerra-20140710.orig/quicktime/qth264.c |
1147 |
-+++ cinelerra-20140710/quicktime/qth264.c |
1148 |
-@@ -370,7 +370,7 @@ static int decode(quicktime_t *file, uns |
1149 |
- if(!codec->decoder) codec->decoder = quicktime_new_ffmpeg( |
1150 |
- file->cpus, |
1151 |
- codec->total_fields, |
1152 |
-- CODEC_ID_H264, |
1153 |
-+ AV_CODEC_ID_H264, |
1154 |
- width, |
1155 |
- height, |
1156 |
- stsd_table); |
1157 |
-Index: cinelerra-20140710/quicktime/wma.c |
1158 |
-=================================================================== |
1159 |
---- cinelerra-20140710.orig/quicktime/wma.c |
1160 |
-+++ cinelerra-20140710/quicktime/wma.c |
1161 |
-@@ -193,15 +193,38 @@ printf("decode 2 %x %llx %llx\n", chunk_ |
1162 |
- codec->packet_buffer, |
1163 |
- chunk_size); |
1164 |
- #else |
1165 |
-- bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; |
1166 |
- AVPacket pkt; |
1167 |
- av_init_packet( &pkt ); |
1168 |
- pkt.data = codec->packet_buffer; |
1169 |
- pkt.size = chunk_size; |
1170 |
-- result = avcodec_decode_audio3(codec->decoder_context, |
1171 |
-- (int16_t*)(codec->work_buffer + codec->output_size * sample_size), |
1172 |
-- &bytes_decoded, |
1173 |
-+ AVFrame *frame = av_frame_alloc(); |
1174 |
-+ int got_frame = 0; |
1175 |
-+ |
1176 |
-+ result = avcodec_decode_audio4(codec->decoder_context, |
1177 |
-+ frame, &got_frame, |
1178 |
- &pkt); |
1179 |
-+ |
1180 |
-+ if(result >= 0 && got_frame) |
1181 |
-+ { |
1182 |
-+ int ch, plane_size; |
1183 |
-+ int planar = av_sample_fmt_is_planar(codec->decoder_context->sample_fmt); |
1184 |
-+ int data_size = av_samples_get_buffer_size(&plane_size, codec->decoder_context->channels, |
1185 |
-+ frame->nb_samples, |
1186 |
-+ codec->decoder_context->sample_fmt, 1); |
1187 |
-+ memcpy(codec->work_buffer + codec->output_size * sample_size, frame->extended_data[0], plane_size); |
1188 |
-+ |
1189 |
-+ if (planar && codec->decoder_context->channels > 1) { |
1190 |
-+ uint8_t *out = ((uint8_t *)(codec->work_buffer + codec->output_size * sample_size)) + plane_size; |
1191 |
-+ for (ch = 1; ch < codec->decoder_context->channels; ch++) { |
1192 |
-+ memcpy(out, frame->extended_data[ch], plane_size); |
1193 |
-+ out += plane_size; |
1194 |
-+ } |
1195 |
-+ } |
1196 |
-+ bytes_decoded = data_size; |
1197 |
-+ } else { |
1198 |
-+ bytes_decoded = 0; |
1199 |
-+ } |
1200 |
-+ av_frame_free(&frame); |
1201 |
- #endif |
1202 |
- |
1203 |
- pthread_mutex_unlock(&ffmpeg_lock); |
1204 |
-@@ -298,7 +321,7 @@ void quicktime_init_codec_wmav1(quicktim |
1205 |
- codec_base->title = "Win Media Audio 1"; |
1206 |
- codec_base->desc = "Win Media Audio 1"; |
1207 |
- codec_base->wav_id = 0x160; |
1208 |
-- codec->ffmpeg_id = CODEC_ID_WMAV1; |
1209 |
-+ codec->ffmpeg_id = AV_CODEC_ID_WMAV1; |
1210 |
- } |
1211 |
- |
1212 |
- |
1213 |
-@@ -313,5 +336,5 @@ void quicktime_init_codec_wmav2(quicktim |
1214 |
- codec_base->title = "Win Media Audio 2"; |
1215 |
- codec_base->desc = "Win Media Audio 2"; |
1216 |
- codec_base->wav_id = 0x161; |
1217 |
-- codec->ffmpeg_id = CODEC_ID_WMAV2; |
1218 |
-+ codec->ffmpeg_id = AV_CODEC_ID_WMAV2; |
1219 |
- } |
1220 |
-Index: cinelerra-20140710/cinelerra/fileyuv.C |
1221 |
-=================================================================== |
1222 |
---- cinelerra-20140710.orig/cinelerra/fileyuv.C |
1223 |
-+++ cinelerra-20140710/cinelerra/fileyuv.C |
1224 |
-@@ -196,7 +196,7 @@ int FileYUV::write_frames(VFrame ***laye |
1225 |
- return stream->write_frame_raw(frame->get_data(), frame_size); |
1226 |
- |
1227 |
- // decode and write an encoded frame |
1228 |
-- if (FFMPEG::codec_id(incoming_asset->vcodec) != CODEC_ID_NONE) |
1229 |
-+ if (FFMPEG::codec_id(incoming_asset->vcodec) != AV_CODEC_ID_NONE) |
1230 |
- { |
1231 |
- if (! ffmpeg) |
1232 |
- { |
1233 |
-@@ -306,7 +306,7 @@ int FileYUV::can_copy_from(Edit *edit, i |
1234 |
- if (edit->asset->format == FILE_YUV) return 1; |
1235 |
- |
1236 |
- // if FFMPEG can decode it, we'll accept it |
1237 |
-- if (FFMPEG::codec_id(edit->asset->vcodec) != CODEC_ID_NONE) return 1; |
1238 |
-+ if (FFMPEG::codec_id(edit->asset->vcodec) != AV_CODEC_ID_NONE) return 1; |
1239 |
- |
1240 |
- incoming_asset = 0; |
1241 |
- |
1242 |
|
1243 |
diff --git a/media-video/cinelerra/files/cinelerra-implicit_decls.patch b/media-video/cinelerra/files/cinelerra-implicit_decls.patch |
1244 |
deleted file mode 100644 |
1245 |
index c806715e8c4..00000000000 |
1246 |
--- a/media-video/cinelerra/files/cinelerra-implicit_decls.patch |
1247 |
+++ /dev/null |
1248 |
@@ -1,36 +0,0 @@ |
1249 |
-Index: CinelerraCV-2.3/quicktime/graphics.c |
1250 |
-=================================================================== |
1251 |
---- CinelerraCV-2.3.orig/quicktime/graphics.c |
1252 |
-+++ CinelerraCV-2.3/quicktime/graphics.c |
1253 |
-@@ -1,5 +1,6 @@ |
1254 |
- #include "graphics.h" |
1255 |
- |
1256 |
-+#include <stdlib.h> |
1257 |
- #include <string.h> |
1258 |
- |
1259 |
- /* Graphics acceleration routines */ |
1260 |
-Index: CinelerraCV-2.3/quicktime/libmjpeg.c |
1261 |
-=================================================================== |
1262 |
---- CinelerraCV-2.3.orig/quicktime/libmjpeg.c |
1263 |
-+++ CinelerraCV-2.3/quicktime/libmjpeg.c |
1264 |
-@@ -17,6 +17,8 @@ |
1265 |
- |
1266 |
- #include <stdio.h> |
1267 |
- #include <stdlib.h> |
1268 |
-+#include <string.h> |
1269 |
-+#include <strings.h> |
1270 |
- #include "colormodels.h" |
1271 |
- #include "libmjpeg.h" |
1272 |
- |
1273 |
-Index: CinelerraCV-2.3/quicktime/qtpng.c |
1274 |
-=================================================================== |
1275 |
---- CinelerraCV-2.3.orig/quicktime/qtpng.c |
1276 |
-+++ CinelerraCV-2.3/quicktime/qtpng.c |
1277 |
-@@ -1,6 +1,7 @@ |
1278 |
- #include "colormodels.h" |
1279 |
- #include "funcprotos.h" |
1280 |
- #include <png.h> |
1281 |
-+#include <string.h> |
1282 |
- #include "quicktime.h" |
1283 |
- #include "qtpng.h" |
1284 |
- |
1285 |
|
1286 |
diff --git a/media-video/cinelerra/files/cinelerra-includes.patch b/media-video/cinelerra/files/cinelerra-includes.patch |
1287 |
deleted file mode 100644 |
1288 |
index 45ac200310d..00000000000 |
1289 |
--- a/media-video/cinelerra/files/cinelerra-includes.patch |
1290 |
+++ /dev/null |
1291 |
@@ -1,12 +0,0 @@ |
1292 |
-Index: CinelerraCV-2.3/cinelerra/audiodevice.C |
1293 |
-=================================================================== |
1294 |
---- CinelerraCV-2.3.orig/cinelerra/audiodevice.C |
1295 |
-+++ CinelerraCV-2.3/cinelerra/audiodevice.C |
1296 |
-@@ -19,6 +19,7 @@ |
1297 |
- * |
1298 |
- */ |
1299 |
- |
1300 |
-+#include <cassert> |
1301 |
- #ifdef HAVE_FIREWIRE |
1302 |
- #include "audio1394.h" |
1303 |
- #endif |
1304 |
|
1305 |
diff --git a/media-video/cinelerra/files/cinelerra-libav9.patch b/media-video/cinelerra/files/cinelerra-libav9.patch |
1306 |
deleted file mode 100644 |
1307 |
index 47a4d6f231e..00000000000 |
1308 |
--- a/media-video/cinelerra/files/cinelerra-libav9.patch |
1309 |
+++ /dev/null |
1310 |
@@ -1,93 +0,0 @@ |
1311 |
-diff -urN cinelerra-20120707/cinelerra/ffmpeg.C /tmp/cinelerra-20120707/cinelerra/ffmpeg.C |
1312 |
---- cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:43.632978553 +0200 |
1313 |
-+++ /tmp/cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:21.668979334 +0200 |
1314 |
-@@ -32,9 +32,9 @@ |
1315 |
- return 1; |
1316 |
- } |
1317 |
- |
1318 |
-- context = avcodec_alloc_context(); |
1319 |
-+ context = avcodec_alloc_context3(NULL); |
1320 |
- |
1321 |
-- if (avcodec_open(context, codec)) { |
1322 |
-+ if (avcodec_open2(context, codec, NULL)) { |
1323 |
- printf("FFMPEG::init avcodec_open() failed\n"); |
1324 |
- } |
1325 |
- |
1326 |
-diff -urN cinelerra-20120707/cinelerra/fileac3.C /tmp/cinelerra-20120707/cinelerra/fileac3.C |
1327 |
---- cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:43.632978553 +0200 |
1328 |
-+++ /tmp/cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:21.668979334 +0200 |
1329 |
-@@ -91,11 +91,11 @@ |
1330 |
- eprintf("codec not found.\n"); |
1331 |
- return 1; |
1332 |
- } |
1333 |
-- codec_context = avcodec_alloc_context(); |
1334 |
-+ codec_context = avcodec_alloc_context3(NULL); |
1335 |
- codec_context->bit_rate = asset->ac3_bitrate * 1000; |
1336 |
- codec_context->sample_rate = asset->sample_rate; |
1337 |
- codec_context->channels = asset->channels; |
1338 |
-- if(avcodec_open(codec_context, codec)) |
1339 |
-+ if(avcodec_open2(codec_context, codec, NULL)) |
1340 |
- { |
1341 |
- eprintf("failed to open codec.\n"); |
1342 |
- return 1; |
1343 |
-diff -urN cinelerra-20120707/quicktime/mpeg4.c /tmp/cinelerra-20120707/quicktime/mpeg4.c |
1344 |
---- cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:43.633978553 +0200 |
1345 |
-+++ /tmp/cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:21.690979334 +0200 |
1346 |
-@@ -642,7 +642,7 @@ |
1347 |
- return 1; |
1348 |
- } |
1349 |
- |
1350 |
-- codec->encoder_context[current_field] = avcodec_alloc_context(); |
1351 |
-+ codec->encoder_context[current_field] = avcodec_alloc_context3(NULL); |
1352 |
- AVCodecContext *context = codec->encoder_context[current_field]; |
1353 |
- |
1354 |
- context->width = width_i; |
1355 |
-@@ -676,8 +676,6 @@ |
1356 |
- context->error_resilience = FF_ER_CAREFUL; |
1357 |
- #elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0) |
1358 |
- context->error_recognition = FF_ER_CAREFUL; |
1359 |
--#else |
1360 |
-- context->err_recognition |= AV_EF_CAREFUL; |
1361 |
- #endif |
1362 |
- context->error_concealment = 3; |
1363 |
- context->frame_skip_cmp = FF_CMP_DCTMAX; |
1364 |
-diff -urN cinelerra-20120707/quicktime/qtffmpeg.c /tmp/cinelerra-20120707/quicktime/qtffmpeg.c |
1365 |
---- cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:43.633978553 +0200 |
1366 |
-+++ /tmp/cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:21.690979334 +0200 |
1367 |
-@@ -67,7 +67,7 @@ |
1368 |
- return 0; |
1369 |
- } |
1370 |
- |
1371 |
-- AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context(); |
1372 |
-+ AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context3(NULL); |
1373 |
- static char fake_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; |
1374 |
- context->width = ptr->width_i; |
1375 |
- context->height = ptr->height_i; |
1376 |
-@@ -93,8 +93,8 @@ |
1377 |
- { |
1378 |
- context->thread_count = cpus; |
1379 |
- } |
1380 |
-- if(avcodec_open(context, |
1381 |
-- ptr->decoder[i]) < 0) |
1382 |
-+ if(avcodec_open2(context, |
1383 |
-+ ptr->decoder[i], NULL) < 0) |
1384 |
- { |
1385 |
- printf("quicktime_new_ffmpeg: avcodec_open failed.\n"); |
1386 |
- quicktime_delete_ffmpeg(ptr); |
1387 |
-diff -urN cinelerra-20120707/quicktime/wma.c /tmp/cinelerra-20120707/quicktime/wma.c |
1388 |
---- cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:43.634978553 +0200 |
1389 |
-+++ /tmp/cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:21.690979334 +0200 |
1390 |
-@@ -76,10 +76,10 @@ |
1391 |
- printf("init_decode: avcodec_find_decoder returned NULL.\n"); |
1392 |
- return 1; |
1393 |
- } |
1394 |
-- codec->decoder_context = avcodec_alloc_context(); |
1395 |
-+ codec->decoder_context = avcodec_alloc_context3(NULL); |
1396 |
- codec->decoder_context->sample_rate = trak->mdia.minf.stbl.stsd.table[0].sample_rate; |
1397 |
- codec->decoder_context->channels = track_map->channels; |
1398 |
-- if(avcodec_open(codec->decoder_context, codec->decoder) < 0) |
1399 |
-+ if(avcodec_open2(codec->decoder_context, codec->decoder, NULL) < 0) |
1400 |
- { |
1401 |
- printf("init_decode: avcodec_open failed.\n"); |
1402 |
- return 1; |
1403 |
- |
1404 |
|
1405 |
diff --git a/media-video/cinelerra/files/cinelerra-pngtoh.patch b/media-video/cinelerra/files/cinelerra-pngtoh.patch |
1406 |
deleted file mode 100644 |
1407 |
index 81a8432b872..00000000000 |
1408 |
--- a/media-video/cinelerra/files/cinelerra-pngtoh.patch |
1409 |
+++ /dev/null |
1410 |
@@ -1,15 +0,0 @@ |
1411 |
-https://bugs.gentoo.org/show_bug.cgi?id=526118 |
1412 |
-http://bugs.cinelerra-cv.org/ticket/1005 |
1413 |
- |
1414 |
-Author: Bernd Feige |
1415 |
- |
1416 |
---- guicast/pngtoh.c 2015-01-29 13:41:01 +0000 |
1417 |
-+++ guicast/pngtoh.c 2015-01-29 13:41:07 +0000 |
1418 |
-@@ -148,4 +148,6 @@ |
1419 |
- fprintf(out, "};\n\n#endif\n"); |
1420 |
- fclose(out); |
1421 |
- } |
1422 |
-+ |
1423 |
-+ return 0; |
1424 |
- } |
1425 |
- |
1426 |
|
1427 |
diff --git a/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch b/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch |
1428 |
deleted file mode 100644 |
1429 |
index 646db9f25f0..00000000000 |
1430 |
--- a/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch |
1431 |
+++ /dev/null |
1432 |
@@ -1,29 +0,0 @@ |
1433 |
-https://bugs.gentoo.org/show_bug.cgi?id=562208 |
1434 |
- |
1435 |
-Index: cinelerra-20140710/toolame-02l/bitstream.c |
1436 |
-=================================================================== |
1437 |
---- cinelerra-20140710.orig/toolame-02l/bitstream.c |
1438 |
-+++ cinelerra-20140710/toolame-02l/bitstream.c |
1439 |
-@@ -198,9 +198,6 @@ void put1bit (Bit_stream_struc * bs, int |
1440 |
- } |
1441 |
- |
1442 |
- /*write N bits into the bit stream */ |
1443 |
--#if !defined(__clang__) |
1444 |
--INLINE |
1445 |
--#endif /* not __clang__ */ |
1446 |
- void putbits (Bit_stream_struc * bs, unsigned int val, int N) |
1447 |
- { |
1448 |
- register int j = N; |
1449 |
-Index: cinelerra-20140710/toolame-02l/bitstream.h |
1450 |
-=================================================================== |
1451 |
---- cinelerra-20140710.orig/toolame-02l/bitstream.h |
1452 |
-+++ cinelerra-20140710/toolame-02l/bitstream.h |
1453 |
-@@ -9,7 +9,7 @@ unsigned int get1bit (Bit_stream_struc * |
1454 |
- void put1bit (Bit_stream_struc *, int); |
1455 |
- unsigned long look_ahead (Bit_stream_struc *, int); |
1456 |
- unsigned long getbits (Bit_stream_struc *, int); |
1457 |
--INLINE void putbits (Bit_stream_struc *, unsigned int, int); |
1458 |
-+void putbits (Bit_stream_struc *, unsigned int, int); |
1459 |
- void byte_ali_putbits (Bit_stream_struc *, unsigned int, int); |
1460 |
- unsigned long byte_ali_getbits (Bit_stream_struc *, int); |
1461 |
- unsigned long sstell (Bit_stream_struc *); |