Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/transcode/, media-video/transcode/files/
Date: Sat, 09 Dec 2017 23:13:30
Message-Id: 1512861186.b33695efbd113e244f04aa56b05c7bb54245ea47.mgorny@gentoo
1 commit: b33695efbd113e244f04aa56b05c7bb54245ea47
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 9 23:08:09 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=b33695ef
7
8 media-video/transcode: [QA] Move patches to a distfile
9
10 Closes: https://bugs.gentoo.org/620604
11
12 media-video/transcode/Manifest | 4 +-
13 .../files/transcode-1.1.7-ffmpeg-0.10.patch | 15 -
14 .../files/transcode-1.1.7-ffmpeg-0.11.patch | 303 -----------
15 .../transcode/files/transcode-1.1.7-ffmpeg.patch | 51 --
16 .../transcode/files/transcode-1.1.7-ffmpeg2.patch | 557 ---------------------
17 .../transcode/files/transcode-1.1.7-ffmpeg24.patch | 18 -
18 .../transcode/files/transcode-1.1.7-ffmpeg29.patch | 352 -------------
19 .../files/transcode-1.1.7-freetype251.patch | 12 -
20 .../transcode/files/transcode-1.1.7-libav-10.patch | 36 --
21 .../transcode/files/transcode-1.1.7-libav-9.patch | 31 --
22 .../files/transcode-1.1.7-preset-force.patch | 28 --
23 .../files/transcode-1.1.7-preset-free.patch | 34 --
24 media-video/transcode/transcode-1.1.7-r3.ebuild | 26 +-
25 13 files changed, 15 insertions(+), 1452 deletions(-)
26
27 diff --git a/media-video/transcode/Manifest b/media-video/transcode/Manifest
28 index 51ff3e47717..557759b9b33 100644
29 --- a/media-video/transcode/Manifest
30 +++ b/media-video/transcode/Manifest
31 @@ -1,2 +1,2 @@
32 -DIST transcode-1.1.7-imagemagick7.patch 34353 SHA256 4ede15540ea6932954ac332c12dde130bf48e7e4773d1e04d3c3f23038c6ac51 SHA512 4eface4bbeb41bf6b44f4efa9bb6e77a0dbb6e22d881261a5884ab843c98ffaf1f40c180d819db6fd48ff81046032b90d11f771d98ba366d2ee4fab94bb99b18 WHIRLPOOL dbd356b24c62d071f989f42969bacbc851782c5125f30724f673b2e50c0be56a15a38d2c63032ee96f0f184b4affe62ef11323a9ddb6fca0955160dec7cb96ba
33 -DIST transcode-1.1.7.tar.bz2 2183627 SHA256 1e4e72d8e0dd62a80b8dd90699f5ca64c9b0cb37a5c9325c184166a9654f0a92 SHA512 d6f9674f3f5c3346194120585741ca660eb9ee133085cfce9460a14eaa0cf16fdf291761bd1db78e1c784e4d69a9481c7470cf8357dc7638ee3017620500f45f WHIRLPOOL ccd085b3a2638de92c2d589ff93038fed3d1a760d3513fde2946a805f7efed87813850f5e9eee306ed8efd3608ad9492d16f4c41bd6278379995deb22f92354e
34 +DIST transcode-1.1.7-patchset.tar.bz2 16379 BLAKE2B fbdc188bffeb8751814abfa7e119a1053e482f194bc1b87a721c48e2b66e107df146d38b3ea11a88d066c49d8862489b88b74f61fa36ce3f8a1a782da3762615 SHA512 bedc82aa4fbc17774e34d8fc24799d70b8460c6c1dd728549bcaa5c387492f56e520674fdf8bb976c0b5fcc9ccefb765f2ee26816e0d2b96a83402a21cee3f6d
35 +DIST transcode-1.1.7.tar.bz2 2183627 BLAKE2B 25001d4cae83d86e5295917bcd9e2e77dd61637e238394a2d603398baf810201dc61d8b0de5b54a7b8848ac3bcef5fb211e8f2b43ed7da4e56e335b8d4d2fbe1 SHA512 d6f9674f3f5c3346194120585741ca660eb9ee133085cfce9460a14eaa0cf16fdf291761bd1db78e1c784e4d69a9481c7470cf8357dc7638ee3017620500f45f
36
37 diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.10.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.10.patch
38 deleted file mode 100644
39 index 5879b24d267..00000000000
40 --- a/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.10.patch
41 +++ /dev/null
42 @@ -1,15 +0,0 @@
43 -http://bugs.gentoo.org/401287
44 -
45 ---- a/filter/filter_pp.c
46 -+++ b/filter/filter_pp.c
47 -@@ -38,8 +38,8 @@
48 -
49 - /* FIXME: these use the filter ID as an index--the ID can grow
50 - * arbitrarily large, so this needs to be fixed */
51 --static pp_mode_t *mode[100];
52 --static pp_context_t *context[100];
53 -+static pp_mode *mode[100];
54 -+static pp_context *context[100];
55 - static int width[100], height[100];
56 - static int pre[100];
57 -
58
59 diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.11.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.11.patch
60 deleted file mode 100644
61 index 871d073fead..00000000000
62 --- a/media-video/transcode/files/transcode-1.1.7-ffmpeg-0.11.patch
63 +++ /dev/null
64 @@ -1,303 +0,0 @@
65 -Fix build with ffmpeg 0.11.
66 -https://bugs.gentoo.org/show_bug.cgi?id=419551
67 -Author: Brennan Shacklett
68 -
69 -diff -urN transcode-1.1.7-orig/encode/encode_lavc.c transcode-1.1.7/encode/encode_lavc.c
70 ---- transcode-1.1.7-orig/encode/encode_lavc.c 2011-11-19 08:50:27.000000000 -0800
71 -+++ transcode-1.1.7/encode/encode_lavc.c 2012-07-03 10:47:03.528009149 -0700
72 -@@ -114,6 +114,7 @@
73 -
74 - AVFrame ff_venc_frame;
75 - AVCodecContext ff_vcontext;
76 -+ AVDictionary ** ff_opts;
77 -
78 - AVCodec *ff_vcodec;
79 -
80 -@@ -1036,14 +1037,10 @@
81 - SET_FLAG(pd, mv0);
82 - SET_FLAG(pd, cbp);
83 - SET_FLAG(pd, qpel);
84 -- SET_FLAG(pd, alt);
85 -- SET_FLAG(pd, vdpart);
86 - SET_FLAG(pd, naq);
87 - SET_FLAG(pd, ilme);
88 - SET_FLAG(pd, ildct);
89 - SET_FLAG(pd, aic);
90 -- SET_FLAG(pd, aiv);
91 -- SET_FLAG(pd, umv);
92 - SET_FLAG(pd, psnr);
93 - SET_FLAG(pd, trell);
94 - SET_FLAG(pd, gray);
95 -@@ -1064,6 +1061,18 @@
96 - pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_DCT;
97 - pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_ME;
98 - }
99 -+ if (pd->confdata.flags.alt) {
100 -+ av_dict_set(pd->ff_opts, "alternate_scan", "1", 0);
101 -+ }
102 -+ if (pd->confdata.flags.vdpart) {
103 -+ av_dict_set(pd->ff_opts, "data_partitioning", "1", 0);
104 -+ }
105 -+ if (pd->confdata.flags.umv) {
106 -+ av_dict_set(pd->ff_opts, "umv", "1", 0);
107 -+ }
108 -+ if (pd->confdata.flags.aiv) {
109 -+ av_dict_set(pd->ff_opts, "aiv", "1", 0);
110 -+ }
111 - }
112 -
113 - #undef SET_FLAG
114 -@@ -1184,18 +1193,18 @@
115 - { "mv0", PAUX(flags.mv0), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0 },
116 - { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
117 - { "qpel", PAUX(flags.qpel), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL },
118 -- { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_ALT_SCAN },
119 -+ { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, 1 },
120 - { "ilme", PAUX(flags.ilme), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME },
121 - { "ildct", PAUX(flags.ildct), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_DCT },
122 - { "naq", PAUX(flags.naq), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_NORMALIZE_AQP },
123 -- { "vdpart", PAUX(flags.vdpart), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART },
124 -+ { "vdpart", PAUX(flags.vdpart), TCCONF_TYPE_FLAG, 0, 0, 1 },
125 - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
126 - { "aic", PAUX(flags.aic), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_AIC },
127 - #else
128 - { "aic", PAUX(flags.aic), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_AC_PRED },
129 - #endif
130 -- { "aiv", PAUX(flags.aiv), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_AIV },
131 -- { "umv", PAUX(flags.umv), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_UMV },
132 -+ { "aiv", PAUX(flags.aiv), TCCONF_TYPE_FLAG, 0, 0, 1 },
133 -+ { "umv", PAUX(flags.umv), TCCONF_TYPE_FLAG, 0, 0, 1 },
134 - { "psnr", PAUX(flags.psnr), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PSNR },
135 - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
136 - { "trell", PAUX(flags.trell), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_TRELLIS_QUANT },
137 -@@ -1387,7 +1396,7 @@
138 - pd->confdata.thread_count,
139 - (pd->confdata.thread_count > 1) ?"s" :"");
140 - }
141 -- avcodec_thread_init(&pd->ff_vcontext, pd->confdata.thread_count);
142 -+ pd->ff_vcontext.thread_count = pd->confdata.thread_count;
143 -
144 - pd->ff_vcodec = avcodec_find_encoder(FF_VCODEC_ID(pd));
145 - if (pd->ff_vcodec == NULL) {
146 -@@ -1397,11 +1406,11 @@
147 - }
148 -
149 - TC_LOCK_LIBAVCODEC;
150 -- ret = avcodec_open(&pd->ff_vcontext, pd->ff_vcodec);
151 -+ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, pd->ff_opts);
152 - TC_UNLOCK_LIBAVCODEC;
153 -
154 - if (ret < 0) {
155 -- tc_log_error(MOD_NAME, "avcodec_open() failed");
156 -+ tc_log_error(MOD_NAME, "avcodec_open2() failed");
157 - goto failed;
158 - }
159 - /* finally, pass up the extradata, if any */
160 -diff -urN transcode-1.1.7-orig/export/export_ffmpeg.c transcode-1.1.7/export/export_ffmpeg.c
161 ---- transcode-1.1.7-orig/export/export_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
162 -+++ transcode-1.1.7/export/export_ffmpeg.c 2012-07-03 13:15:23.918019415 -0700
163 -@@ -122,6 +122,7 @@
164 - static AVFrame *lavc_convert_frame = NULL;
165 -
166 - static AVCodec *lavc_venc_codec = NULL;
167 -+static AVDictionary **lavc_venc_opts = NULL;
168 - static AVFrame *lavc_venc_frame = NULL;
169 - static AVCodecContext *lavc_venc_context;
170 - static avi_t *avifile = NULL;
171 -@@ -180,7 +181,7 @@
172 -
173 -
174 - /* START: COPIED FROM ffmpeg-0.5_p22846(ffmpeg.c, cmdutils.c) */
175 --#include <libavcodec/opt.h>
176 -+#include <libavutil/opt.h>
177 - #include <libavutil/avstring.h>
178 - #include <libswscale/swscale.h>
179 -
180 -@@ -470,7 +471,6 @@
181 - }
182 -
183 - TC_LOCK_LIBAVCODEC;
184 -- avcodec_init();
185 - avcodec_register_all();
186 - TC_UNLOCK_LIBAVCODEC;
187 -
188 -@@ -634,7 +634,7 @@
189 - lavc_param_rc_max_rate = 2516;
190 - lavc_param_rc_buffer_size = 224 * 8;
191 - lavc_param_rc_buffer_aggressivity = 99;
192 -- lavc_param_scan_offset = CODEC_FLAG_SVCD_SCAN_OFFSET;
193 -+ lavc_param_scan_offset = 1;
194 -
195 - break;
196 -
197 -@@ -674,7 +674,7 @@
198 -
199 - lavc_param_rc_buffer_size = 224 * 8;
200 - lavc_param_rc_buffer_aggressivity = 99;
201 -- lavc_param_scan_offset = CODEC_FLAG_SVCD_SCAN_OFFSET;
202 -+ lavc_param_scan_offset = 1;
203 -
204 - break;
205 -
206 -@@ -887,7 +887,7 @@
207 - lavc_venc_context->thread_count);
208 - }
209 -
210 -- avcodec_thread_init(lavc_venc_context, lavc_param_threads);
211 -+ lavc_venc_context->thread_count = lavc_param_threads;
212 -
213 - if (lavc_param_intra_matrix) {
214 - char *tmp;
215 -@@ -1065,15 +1065,10 @@
216 - lavc_venc_context->flags |= lavc_param_closedgop;
217 - lavc_venc_context->flags |= lavc_param_trunc;
218 - lavc_venc_context->flags |= lavc_param_aic;
219 -- lavc_venc_context->flags |= lavc_param_umv;
220 - lavc_venc_context->flags |= lavc_param_v4mv;
221 -- lavc_venc_context->flags |= lavc_param_data_partitioning;
222 - lavc_venc_context->flags |= lavc_param_cbp;
223 - lavc_venc_context->flags |= lavc_param_mv0;
224 - lavc_venc_context->flags |= lavc_param_qp_rd;
225 -- lavc_venc_context->flags |= lavc_param_scan_offset;
226 -- lavc_venc_context->flags |= lavc_param_ss;
227 -- lavc_venc_context->flags |= lavc_param_alt;
228 - lavc_venc_context->flags |= lavc_param_ilme;
229 - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
230 - lavc_venc_context->flags |= lavc_param_trell;
231 -@@ -1203,7 +1198,6 @@
232 -
233 - lavc_venc_context->me_method = ME_ZERO + lavc_param_vme;
234 -
235 --
236 - /* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
237 - if (lavc_param_video_preset) {
238 - avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
239 -@@ -1241,20 +1235,39 @@
240 - }
241 - }
242 -
243 -+ if (lavc_param_scan_offset) {
244 -+ av_dict_set(lavc_venc_opts, "scan_offset", "1", 0);
245 -+ }
246 -+
247 -+ if (lavc_param_ss) {
248 -+ av_dict_set(lavc_venc_opts, "structured_slices", "1", 0);
249 -+ }
250 -+
251 -+ if (lavc_param_alt) {
252 -+ av_dict_set(lavc_venc_opts, "alternate_scan", "1", 0);
253 -+ }
254 -+
255 -+ if (lavc_param_umv) {
256 -+ av_dict_set(lavc_venc_opts, "umv", "1", 0);
257 -+ }
258 -+
259 -+ if (lavc_param_data_partitioning) {
260 -+ av_dict_set(lavc_venc_opts, "vdpart", "1", 0);
261 -+ }
262 -
263 - //-- open codec --
264 - //----------------
265 - TC_LOCK_LIBAVCODEC;
266 -- ret = avcodec_open(lavc_venc_context, lavc_venc_codec);
267 -+ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, lavc_venc_opts);
268 - TC_UNLOCK_LIBAVCODEC;
269 - if (ret < 0) {
270 - tc_log_warn(MOD_NAME, "could not open FFMPEG codec");
271 - return TC_EXPORT_ERROR;
272 - }
273 -
274 -- if (lavc_venc_context->codec->encode == NULL) {
275 -+ if (av_codec_is_encoder(lavc_venc_context->codec) == 0) {
276 - tc_log_warn(MOD_NAME, "could not open FFMPEG codec "
277 -- "(lavc_venc_context->codec->encode == NULL)");
278 -+ "(av_codec_is_encoder(lavc_venc_context->codec) == 0)");
279 - return TC_EXPORT_ERROR;
280 - }
281 -
282 -diff -urN transcode-1.1.7-orig/export/ffmpeg_cfg.c transcode-1.1.7/export/ffmpeg_cfg.c
283 ---- transcode-1.1.7-orig/export/ffmpeg_cfg.c 2011-11-19 08:50:27.000000000 -0800
284 -+++ transcode-1.1.7/export/ffmpeg_cfg.c 2012-07-03 10:09:25.011003254 -0700
285 -@@ -160,9 +160,9 @@
286 - {"vcelim", &lavc_param_chroma_elim_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
287 - {"vpsize", &lavc_param_packet_size, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000},
288 - {"vstrict", &lavc_param_strict, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
289 -- {"vdpart", &lavc_param_data_partitioning, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART},
290 -+ {"vdpart", &lavc_param_data_partitioning, TCCONF_TYPE_FLAG, 0, 0, 1},
291 - // {"keyint", &lavc_param_keyint, TCCONF_TYPE_INT, 0, 0, 0},
292 -- {"gray", &lavc_param_gray, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART},
293 -+ {"gray", &lavc_param_gray, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_GRAY},
294 - {"mpeg_quant", &lavc_param_mpeg_quant, TCCONF_TYPE_FLAG, 0, 0, 1},
295 - {"vi_qfactor", &lavc_param_vi_qfactor, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, -31.0, 31.0},
296 - {"vi_qoffset", &lavc_param_vi_qoffset, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 31.0},
297 -@@ -211,7 +211,7 @@
298 - #else
299 - {"aic", &lavc_param_aic, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_AC_PRED},
300 - #endif
301 -- {"umv", &lavc_param_umv, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_UMV},
302 -+ {"umv", &lavc_param_umv, TCCONF_TYPE_FLAG, 0, 0, 1},
303 - {"ibias", &lavc_param_ibias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
304 - {"pbias", &lavc_param_pbias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
305 - {"coder", &lavc_param_coder, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
306 -@@ -223,9 +223,9 @@
307 - {"nr", &lavc_param_noise_reduction, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
308 - {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
309 - {"threads", &lavc_param_threads, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 16},
310 -- {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_SLICE_STRUCT},
311 -- {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_SVCD_SCAN_OFFSET},
312 -- {"alt", &lavc_param_alt, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_ALT_SCAN},
313 -+ {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, 1},
314 -+ {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, 1},
315 -+ {"alt", &lavc_param_alt, TCCONF_TYPE_FLAG, 0, 0, 1},
316 - {"ilme", &lavc_param_ilme, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME},
317 - {"inter_threshold", &lavc_param_inter_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -1000000, 1000000},
318 - {"sc_threshold", &lavc_param_sc_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -1000000, 1000000},
319 -diff -urN transcode-1.1.7-orig/import/decode_lavc.c transcode-1.1.7/import/decode_lavc.c
320 ---- transcode-1.1.7-orig/import/decode_lavc.c 2011-11-19 08:50:27.000000000 -0800
321 -+++ transcode-1.1.7/import/decode_lavc.c 2012-07-03 10:21:46.085005182 -0700
322 -@@ -181,7 +181,7 @@
323 - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
324 - lavc_dec_context->error_resilience = 2;
325 - #else
326 -- lavc_dec_context->error_recognition = 2;
327 -+ lavc_dec_context->err_recognition = 2;
328 - #endif
329 - lavc_dec_context->error_concealment = 3;
330 - lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
331 -diff -urN transcode-1.1.7-orig/import/import_ffmpeg.c transcode-1.1.7/import/import_ffmpeg.c
332 ---- transcode-1.1.7-orig/import/import_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
333 -+++ transcode-1.1.7/import/import_ffmpeg.c 2012-07-03 10:19:36.936004841 -0700
334 -@@ -314,7 +314,7 @@
335 - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
336 - lavc_dec_context->error_resilience = 2;
337 - #else
338 -- lavc_dec_context->error_recognition = 2;
339 -+ lavc_dec_context->err_recognition = 2;
340 - #endif
341 - lavc_dec_context->error_concealment = 3;
342 - lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
343 -diff -urN transcode-1.1.7-orig/import/probe_ffmpeg.c transcode-1.1.7/import/probe_ffmpeg.c
344 ---- transcode-1.1.7-orig/import/probe_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
345 -+++ transcode-1.1.7/import/probe_ffmpeg.c 2012-07-03 10:41:42.782008306 -0700
346 -@@ -99,8 +99,8 @@
347 -
348 - TC_INIT_LIBAVCODEC;
349 -
350 -- ret = av_open_input_file(&lavf_dmx_context, ipipe->name,
351 -- NULL, 0, NULL);
352 -+ ret = avformat_open_input(&lavf_dmx_context, ipipe->name,
353 -+ NULL, NULL);
354 - if (ret != 0) {
355 - tc_log_error(__FILE__, "unable to open '%s'"
356 - " (libavformat failure)",
357 -diff -urN transcode-1.1.7-orig/libtc/tcavcodec.h transcode-1.1.7/libtc/tcavcodec.h
358 ---- transcode-1.1.7-orig/libtc/tcavcodec.h 2011-11-19 08:50:27.000000000 -0800
359 -+++ transcode-1.1.7/libtc/tcavcodec.h 2012-07-03 10:34:43.648007213 -0700
360 -@@ -53,7 +53,6 @@
361 -
362 - #define TC_INIT_LIBAVCODEC do { \
363 - TC_LOCK_LIBAVCODEC; \
364 -- avcodec_init(); \
365 - avcodec_register_all(); \
366 - TC_UNLOCK_LIBAVCODEC; \
367 - } while (0)
368
369 diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg.patch
370 deleted file mode 100644
371 index 1e7459830c1..00000000000
372 --- a/media-video/transcode/files/transcode-1.1.7-ffmpeg.patch
373 +++ /dev/null
374 @@ -1,51 +0,0 @@
375 ---- a/encode/encode_lavc.c
376 -+++ b/encode/encode_lavc.c
377 -@@ -955,8 +955,6 @@
378 - /*
379 - * context *transcode* (not libavcodec) defaults
380 - */
381 -- pd->ff_vcontext.mb_qmin = 2;
382 -- pd->ff_vcontext.mb_qmax = 31;
383 - pd->ff_vcontext.max_qdiff = 3;
384 - pd->ff_vcontext.max_b_frames = 0;
385 - pd->ff_vcontext.me_range = 0;
386 -@@ -1116,8 +1114,6 @@
387 - // handled by transcode core
388 - // { "vqmax", PCTX(qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
389 - // handled by transcode core
390 -- { "mbqmin", PCTX(mb_qmin), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
391 -- { "mbqmax", PCTX(mb_qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
392 - { "lmin", PAUX(lmin), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
393 - { "lmax", PAUX(lmax), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
394 - { "vqdiff", PCTX(max_qdiff), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31 },
395 ---- a/export/ffmpeg_cfg.c
396 -+++ b/export/ffmpeg_cfg.c
397 -@@ -34,8 +34,6 @@
398 - //int lavc_param_vqscale = 0;
399 - //int lavc_param_vqmin = 2;
400 - //int lavc_param_vqmax = 31;
401 --int lavc_param_mb_qmin = 2;
402 --int lavc_param_mb_qmax = 31;
403 - int lavc_param_lmin = 2;
404 - int lavc_param_lmax = 31;
405 - int lavc_param_vqdiff = 3;
406 -@@ -143,8 +141,6 @@
407 - // {"vqscale", &lavc_param_vqscale, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
408 - // {"vqmin", &lavc_param_vqmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
409 - // {"vqmax", &lavc_param_vqmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
410 -- {"mbqmin", &lavc_param_mb_qmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
411 -- {"mbqmax", &lavc_param_mb_qmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
412 - {"lmin", &lavc_param_lmin, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
413 - {"lmax", &lavc_param_lmax, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
414 - {"vqdiff", &lavc_param_vqdiff, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
415 ---- a/export/ffmpeg_cfg.h
416 -+++ b/export/ffmpeg_cfg.h
417 -@@ -13,8 +13,6 @@
418 - //extern int lavc_param_vqscale;
419 - //extern int lavc_param_vqmin;
420 - //extern int lavc_param_vqmax;
421 --extern int lavc_param_mb_qmin;
422 --extern int lavc_param_mb_qmax;
423 - extern int lavc_param_lmin;
424 - extern int lavc_param_lmax;
425 - extern int lavc_param_vqdiff;
426
427 diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg2.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg2.patch
428 deleted file mode 100644
429 index 9a770a6a0de..00000000000
430 --- a/media-video/transcode/files/transcode-1.1.7-ffmpeg2.patch
431 +++ /dev/null
432 @@ -1,557 +0,0 @@
433 -Fix build with ffmpeg-2.0.
434 -Fix segfaults introduced by wrong usage of the av_dict API.
435 -Fix forgotten parts in the libav9 patch.
436 -
437 -Index: transcode-1.1.7/encode/encode_lavc.c
438 -===================================================================
439 ---- transcode-1.1.7.orig/encode/encode_lavc.c
440 -+++ transcode-1.1.7/encode/encode_lavc.c
441 -@@ -74,6 +74,9 @@ struct tclavcconfigdata_ {
442 - int lmin;
443 - int lmax;
444 - int me_method;
445 -+ int luma_elim_threshold;
446 -+ int chroma_elim_threshold;
447 -+ int quantizer_noise_shaping;
448 -
449 - /* same as above for flags */
450 - struct {
451 -@@ -114,7 +117,7 @@ struct tclavcprivatedata_ {
452 -
453 - AVFrame ff_venc_frame;
454 - AVCodecContext ff_vcontext;
455 -- AVDictionary ** ff_opts;
456 -+ AVDictionary * ff_opts;
457 -
458 - AVCodec *ff_vcodec;
459 -
460 -@@ -165,6 +168,7 @@ static const TCCodecID tc_lavc_codecs_ou
461 - TC_CODEC_ERROR
462 - };
463 -
464 -+#if LIBAVCODEC_VERSION_MAJOR < 55
465 - static const enum CodecID tc_lavc_internal_codecs[] = {
466 - CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO, CODEC_ID_MPEG4,
467 - CODEC_ID_H263I, CODEC_ID_H263P,
468 -@@ -177,6 +181,20 @@ static const enum CodecID tc_lavc_intern
469 - CODEC_ID_MSMPEG4V2, CODEC_ID_MSMPEG4V3,
470 - CODEC_ID_NONE
471 - };
472 -+#else
473 -+static const enum AVCodecID tc_lavc_internal_codecs[] = {
474 -+ AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO, AV_CODEC_ID_MPEG4,
475 -+ AV_CODEC_ID_H263I, AV_CODEC_ID_H263P,
476 -+ AV_CODEC_ID_H264,
477 -+ AV_CODEC_ID_WMV1, AV_CODEC_ID_WMV2,
478 -+ AV_CODEC_ID_RV10,
479 -+ AV_CODEC_ID_HUFFYUV, AV_CODEC_ID_FFV1,
480 -+ AV_CODEC_ID_DVVIDEO,
481 -+ AV_CODEC_ID_MJPEG, AV_CODEC_ID_LJPEG,
482 -+ AV_CODEC_ID_MSMPEG4V2, AV_CODEC_ID_MSMPEG4V3,
483 -+ AV_CODEC_ID_NONE
484 -+};
485 -+#endif
486 -
487 - static const TCFormatID tc_lavc_formats[] = { TC_FORMAT_ERROR };
488 -
489 -@@ -938,7 +956,11 @@ static int tc_lavc_settings_from_vob(TCL
490 - static void tc_lavc_config_defaults(TCLavcPrivateData *pd)
491 - {
492 - /* first of all reinitialize lavc data */
493 -+#if LIBAVCODEC_VERSION_MAJOR < 55
494 - avcodec_get_context_defaults(&pd->ff_vcontext);
495 -+#else
496 -+ avcodec_get_context_defaults3(&pd->ff_vcontext, NULL);
497 -+#endif
498 -
499 - pd->confdata.thread_count = 1;
500 -
501 -@@ -976,8 +998,8 @@ static void tc_lavc_config_defaults(TCLa
502 - pd->ff_vcontext.mpeg_quant = 0;
503 - pd->ff_vcontext.rc_initial_cplx = 0.0;
504 - pd->ff_vcontext.rc_qsquish = 1.0;
505 -- pd->ff_vcontext.luma_elim_threshold = 0;
506 -- pd->ff_vcontext.chroma_elim_threshold = 0;
507 -+ pd->confdata.luma_elim_threshold = 0;
508 -+ pd->confdata.chroma_elim_threshold = 0;
509 - pd->ff_vcontext.strict_std_compliance = 0;
510 - pd->ff_vcontext.dct_algo = FF_DCT_AUTO;
511 - pd->ff_vcontext.idct_algo = FF_IDCT_AUTO;
512 -@@ -1001,7 +1023,7 @@ static void tc_lavc_config_defaults(TCLa
513 - pd->ff_vcontext.intra_quant_bias = FF_DEFAULT_QUANT_BIAS;
514 - pd->ff_vcontext.inter_quant_bias = FF_DEFAULT_QUANT_BIAS;
515 - pd->ff_vcontext.noise_reduction = 0;
516 -- pd->ff_vcontext.quantizer_noise_shaping = 0;
517 -+ pd->confdata.quantizer_noise_shaping = 0;
518 - pd->ff_vcontext.flags = 0;
519 - }
520 -
521 -@@ -1033,7 +1055,6 @@ static void tc_lavc_dispatch_settings(TC
522 -
523 - pd->ff_vcontext.flags = 0;
524 - SET_FLAG(pd, mv0);
525 -- SET_FLAG(pd, cbp);
526 - SET_FLAG(pd, qpel);
527 - SET_FLAG(pd, naq);
528 - SET_FLAG(pd, ilme);
529 -@@ -1060,17 +1081,29 @@ static void tc_lavc_dispatch_settings(TC
530 - pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_ME;
531 - }
532 - if (pd->confdata.flags.alt) {
533 -- av_dict_set(pd->ff_opts, "alternate_scan", "1", 0);
534 -+ av_dict_set(&(pd->ff_opts), "alternate_scan", "1", 0);
535 - }
536 - if (pd->confdata.flags.vdpart) {
537 -- av_dict_set(pd->ff_opts, "data_partitioning", "1", 0);
538 -+ av_dict_set(&(pd->ff_opts), "data_partitioning", "1", 0);
539 - }
540 - if (pd->confdata.flags.umv) {
541 -- av_dict_set(pd->ff_opts, "umv", "1", 0);
542 -+ av_dict_set(&(pd->ff_opts), "umv", "1", 0);
543 - }
544 - if (pd->confdata.flags.aiv) {
545 -- av_dict_set(pd->ff_opts, "aiv", "1", 0);
546 -+ av_dict_set(&(pd->ff_opts), "aiv", "1", 0);
547 - }
548 -+ if (pd->confdata.flags.cbp) {
549 -+ av_dict_set(&(pd->ff_opts), "mpv_flags", "+cbp_rd", 0);
550 -+ }
551 -+
552 -+ char buf[1024];
553 -+#define set_dict_opt(val, opt) \
554 -+ snprintf(buf, sizeof(buf), "%i", pd->confdata.val);\
555 -+ av_dict_set(&(pd->ff_opts), opt, buf, 0)
556 -+
557 -+ set_dict_opt(luma_elim_threshold, "luma_elim_threshold");
558 -+ set_dict_opt(chroma_elim_threshold, "chroma_elim_threshold");
559 -+ set_dict_opt(quantizer_noise_shaping, "quantizer_noise_shaping");
560 - }
561 -
562 - #undef SET_FLAG
563 -@@ -1155,8 +1188,8 @@ static int tc_lavc_read_config(TCLavcPri
564 - { "vrc_init_cplx", PCTX(rc_initial_cplx), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 9999999.0 },
565 - // { "vrc_init_occupancy", }, // not yet supported
566 - { "vqsquish", PCTX(rc_qsquish), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 99.0 },
567 -- { "vlelim", PCTX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
568 -- { "vcelim", PCTX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
569 -+ { "vlelim", PAUX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
570 -+ { "vcelim", PAUX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
571 - { "vstrict", PCTX(strict_std_compliance), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
572 - { "vpsize", PCTX(rtp_payload_size), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000 },
573 - { "dct", PCTX(dct_algo), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10 },
574 -@@ -1182,12 +1215,12 @@ static int tc_lavc_read_config(TCLavcPri
575 - { "ibias", PCTX(intra_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
576 - { "pbias", PCTX(inter_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
577 - { "nr", PCTX(noise_reduction), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
578 -- { "qns", PCTX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
579 -+ { "qns", PAUX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
580 - { "inter_matrix_file", inter_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
581 - { "intra_matrix_file", intra_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
582 -
583 - { "mv0", PAUX(flags.mv0), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0 },
584 -- { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
585 -+ { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, 1 },
586 - { "qpel", PAUX(flags.qpel), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL },
587 - { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, 1 },
588 - { "ilme", PAUX(flags.ilme), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME },
589 -@@ -1350,6 +1383,8 @@ static int tc_lavc_configure(TCModuleIns
590 -
591 - pd = self->userdata;
592 -
593 -+ pd->ff_opts = NULL;
594 -+
595 - pd->flush_flag = vob->encoder_flush;
596 -
597 - /* FIXME: move into core? */
598 -@@ -1402,7 +1437,7 @@ static int tc_lavc_configure(TCModuleIns
599 - }
600 -
601 - TC_LOCK_LIBAVCODEC;
602 -- ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, pd->ff_opts);
603 -+ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, &(pd->ff_opts));
604 - TC_UNLOCK_LIBAVCODEC;
605 -
606 - if (ret < 0) {
607 -Index: transcode-1.1.7/export/export_ffmpeg.c
608 -===================================================================
609 ---- transcode-1.1.7.orig/export/export_ffmpeg.c
610 -+++ transcode-1.1.7/export/export_ffmpeg.c
611 -@@ -122,7 +122,7 @@ static uint8_t *img_buffer =
612 - static AVFrame *lavc_convert_frame = NULL;
613 -
614 - static AVCodec *lavc_venc_codec = NULL;
615 --static AVDictionary **lavc_venc_opts = NULL;
616 -+static AVDictionary *lavc_venc_opts = NULL;
617 - static AVFrame *lavc_venc_frame = NULL;
618 - static AVCodecContext *lavc_venc_context;
619 - static avi_t *avifile = NULL;
620 -@@ -486,7 +486,7 @@ MOD_init
621 - codec->name, codec->fourCC, codec->comments);
622 - }
623 -
624 -- lavc_venc_context = avcodec_alloc_context();
625 -+ lavc_venc_context = avcodec_alloc_context3(lavc_venc_codec);
626 - lavc_venc_frame = avcodec_alloc_frame();
627 -
628 - lavc_convert_frame= avcodec_alloc_frame();
629 -@@ -838,8 +838,13 @@ MOD_init
630 - lavc_venc_context->rc_strategy = lavc_param_vrc_strategy;
631 - lavc_venc_context->b_frame_strategy = lavc_param_vb_strategy;
632 - lavc_venc_context->b_quant_offset = lavc_param_vb_qoffset;
633 -- lavc_venc_context->luma_elim_threshold= lavc_param_luma_elim_threshold;
634 -- lavc_venc_context->chroma_elim_threshold= lavc_param_chroma_elim_threshold;
635 -+
636 -+ char buf[1024];
637 -+#define set_dict_opt(val, opt) \
638 -+ snprintf(buf, sizeof(buf), "%i", val); \
639 -+ av_dict_set(&lavc_venc_opts, opt, buf, 0)
640 -+ set_dict_opt(lavc_param_luma_elim_threshold, "luma_elim_threshold");
641 -+ set_dict_opt(lavc_param_chroma_elim_threshold, "chroma_elim_threshold");
642 - lavc_venc_context->rtp_payload_size = lavc_param_packet_size;
643 - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
644 - if (lavc_param_packet_size)
645 -@@ -870,7 +875,7 @@ MOD_init
646 - lavc_venc_context->context_model = lavc_param_context;
647 - lavc_venc_context->scenechange_threshold= lavc_param_sc_threshold;
648 - lavc_venc_context->noise_reduction = lavc_param_noise_reduction;
649 -- lavc_venc_context->inter_threshold = lavc_param_inter_threshold;
650 -+ set_dict_opt(lavc_param_inter_threshold, "inter_threshold");
651 - lavc_venc_context->intra_dc_precision = lavc_param_intra_dc_precision;
652 - lavc_venc_context->skip_top = lavc_param_skip_top;
653 - lavc_venc_context->skip_bottom = lavc_param_skip_bottom;
654 -@@ -1066,9 +1071,11 @@ MOD_init
655 - lavc_venc_context->flags |= lavc_param_trunc;
656 - lavc_venc_context->flags |= lavc_param_aic;
657 - lavc_venc_context->flags |= lavc_param_v4mv;
658 -- lavc_venc_context->flags |= lavc_param_cbp;
659 -+ if(lavc_param_cbp)
660 -+ av_dict_set(&lavc_venc_opts, "mpv_flags", "+cbp_rd", 0);
661 - lavc_venc_context->flags |= lavc_param_mv0;
662 -- lavc_venc_context->flags |= lavc_param_qp_rd;
663 -+ if(lavc_param_qp_rd)
664 -+ av_dict_set(&lavc_venc_opts, "mpv_flags", "+qp_rd", 0);
665 - lavc_venc_context->flags |= lavc_param_ilme;
666 - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
667 - lavc_venc_context->flags |= lavc_param_trell;
668 -@@ -1238,29 +1245,29 @@ MOD_init
669 - }
670 -
671 - if (lavc_param_scan_offset) {
672 -- av_dict_set(lavc_venc_opts, "scan_offset", "1", 0);
673 -+ av_dict_set(&lavc_venc_opts, "scan_offset", "1", 0);
674 - }
675 -
676 - if (lavc_param_ss) {
677 -- av_dict_set(lavc_venc_opts, "structured_slices", "1", 0);
678 -+ av_dict_set(&lavc_venc_opts, "structured_slices", "1", 0);
679 - }
680 -
681 - if (lavc_param_alt) {
682 -- av_dict_set(lavc_venc_opts, "alternate_scan", "1", 0);
683 -+ av_dict_set(&lavc_venc_opts, "alternate_scan", "1", 0);
684 - }
685 -
686 - if (lavc_param_umv) {
687 -- av_dict_set(lavc_venc_opts, "umv", "1", 0);
688 -+ av_dict_set(&lavc_venc_opts, "umv", "1", 0);
689 - }
690 -
691 - if (lavc_param_data_partitioning) {
692 -- av_dict_set(lavc_venc_opts, "vdpart", "1", 0);
693 -+ av_dict_set(&lavc_venc_opts, "vdpart", "1", 0);
694 - }
695 -
696 - //-- open codec --
697 - //----------------
698 - TC_LOCK_LIBAVCODEC;
699 -- ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, lavc_venc_opts);
700 -+ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, &lavc_venc_opts);
701 - TC_UNLOCK_LIBAVCODEC;
702 - if (ret < 0) {
703 - tc_log_warn(MOD_NAME, "could not open FFMPEG codec");
704 -Index: transcode-1.1.7/export/ffmpeg_cfg.c
705 -===================================================================
706 ---- transcode-1.1.7.orig/export/ffmpeg_cfg.c
707 -+++ transcode-1.1.7/export/ffmpeg_cfg.c
708 -@@ -214,10 +214,10 @@ TCConfigEntry lavcopts_conf[]={
709 - {"context", &lavc_param_context, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
710 - {"intra_matrix", &lavc_param_intra_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
711 - {"inter_matrix", &lavc_param_inter_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
712 -- {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD},
713 -+ {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, 1},
714 - {"mv0", &lavc_param_mv0, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0},
715 - {"nr", &lavc_param_noise_reduction, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
716 -- {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
717 -+ {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, 1},
718 - {"threads", &lavc_param_threads, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 16},
719 - {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, 1},
720 - {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, 1},
721 -Index: transcode-1.1.7/export/aud_aux.c
722 -===================================================================
723 ---- transcode-1.1.7.orig/export/aud_aux.c
724 -+++ transcode-1.1.7/export/aud_aux.c
725 -@@ -326,10 +326,18 @@ static int tc_audio_init_ffmpeg(vob_t *vob, int o_codec)
726 -
727 - switch (o_codec) {
728 - case 0x50:
729 -+#if LIBAVCODEC_VERSION_MAJOR < 55
730 - codeid = CODEC_ID_MP2;
731 -+#else
732 -+ codeid = AV_CODEC_ID_MP2;
733 -+#endif
734 - break;
735 - case 0x2000:
736 -+#if LIBAVCODEC_VERSION_MAJOR < 55
737 - codeid = CODEC_ID_AC3;
738 -+#else
739 -+ codeid = AV_CODEC_ID_AC3;
740 -+#endif
741 - break;
742 - default:
743 - tc_warn("cannot init ffmpeg with %x", o_codec);
744 -@@ -346,7 +346,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
745 -
746 - //-- set parameters (bitrate, channels and sample-rate) --
747 - //--------------------------------------------------------
748 -- avcodec_get_context_defaults(&mpa_ctx);
749 -+ avcodec_get_context_defaults3(&mpa_ctx, mpa_codec);
750 - #if LIBAVCODEC_VERSION_MAJOR < 53
751 - mpa_ctx.codec_type = CODEC_TYPE_AUDIO;
752 - #else
753 -@@ -359,7 +359,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
754 - //-- open codec --
755 - //----------------
756 - TC_LOCK_LIBAVCODEC;
757 -- ret = avcodec_open(&mpa_ctx, mpa_codec);
758 -+ ret = avcodec_open2(&mpa_ctx, mpa_codec, NULL);
759 - TC_UNLOCK_LIBAVCODEC;
760 - if (ret < 0) {
761 - tc_warn("tc_audio_init_ffmpeg: could not open %s codec !",
762 -@@ -371,7 +371,12 @@ static int tc_audio_init_ffmpeg(vob_t *vob, int o_codec)
763 - TC_UNLOCK_LIBAVCODEC;
764 - if (ret < 0) {
765 - tc_warn("tc_audio_init_ffmpeg: could not open %s codec !",
766 -- (codeid == CODEC_ID_MP2) ?"mpa" :"ac3");
767 -+#if LIBAVCODEC_VERSION_MAJOR < 55
768 -+ (codeid == CODEC_ID_MP2)
769 -+#else
770 -+ (codeid == AV_CODEC_ID_MP2)
771 -+#endif
772 -+ ?"mpa" :"ac3");
773 - return(TC_EXPORT_ERROR);
774 - }
775 -
776 -Index: transcode-1.1.7/import/import_ffmpeg.c
777 -===================================================================
778 ---- transcode-1.1.7.orig/import/import_ffmpeg.c
779 -+++ transcode-1.1.7/import/import_ffmpeg.c
780 -@@ -58,6 +58,7 @@ struct ffmpeg_codec {
781 - };
782 -
783 - // fourCC to ID mapping taken from MPlayer's codecs.conf
784 -+#if LIBAVCODEC_VERSION_MAJOR < 55
785 - static struct ffmpeg_codec ffmpeg_codecs[] = {
786 - {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
787 - {"MP41", "DIV1", ""}},
788 -@@ -106,6 +107,56 @@ static struct ffmpeg_codec ffmpeg_codecs[] = {
789 - {CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw",
790 - {"Y42B", ""}},
791 - {0, TC_CODEC_UNKNOWN, NULL, {""}}};
792 -+#else
793 -+static struct ffmpeg_codec ffmpeg_codecs[] = {
794 -+ {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
795 -+ {"MP41", "DIV1", ""}},
796 -+ {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
797 -+ {"MP42", "DIV2", ""}},
798 -+ {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
799 -+ {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}},
800 -+ {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
801 -+ {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}},
802 -+ {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
803 -+ {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}},
804 -+ {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPG1, "mpeg1video",
805 -+ {"MPG1", ""}},
806 -+ {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
807 -+ {"DVSD", ""}},
808 -+ {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
809 -+ {"WMV1", ""}},
810 -+ {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
811 -+ {"WMV2", ""}},
812 -+ {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
813 -+ {"HFYU", ""}},
814 -+ {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
815 -+ {"I263", ""}},
816 -+ {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
817 -+ {"H263", "U263", "VIV1", ""}},
818 -+ {AV_CODEC_ID_H264, TC_CODEC_H264, "h264",
819 -+ {"H264", "h264", "X264", "x264", "avc1", ""}},
820 -+ {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
821 -+ {"RV10", "RV13", ""}},
822 -+ {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
823 -+ {"SVQ1", ""}},
824 -+ {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
825 -+ {"SVQ3", ""}},
826 -+ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
827 -+ {"MPG2", ""}},
828 -+ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG, "mpeg2video",
829 -+ {"MPG2", ""}},
830 -+ {AV_CODEC_ID_ASV1, TC_CODEC_ASV1, "asv1",
831 -+ {"ASV1", ""}},
832 -+ {AV_CODEC_ID_ASV2, TC_CODEC_ASV2, "asv2",
833 -+ {"ASV2", ""}},
834 -+ {AV_CODEC_ID_FFV1, TC_CODEC_FFV1, "ffv1",
835 -+ {"FFV1", ""}},
836 -+ {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV420P, "raw",
837 -+ {"I420", "IYUV", ""}},
838 -+ {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw",
839 -+ {"Y42B", ""}},
840 -+ {0, TC_CODEC_UNKNOWN, NULL, {""}}};
841 -+#endif
842 -
843 - #define BUFFER_SIZE SIZE_RGB_FRAME
844 -
845 -@@ -302,7 +302,7 @@ do_avi:
846 -
847 - // Set these to the expected values so that ffmpeg's decoder can
848 - // properly detect interlaced input.
849 -- lavc_dec_context = avcodec_alloc_context();
850 -+ lavc_dec_context = avcodec_alloc_context3(lavc_dec_codec);
851 - if (lavc_dec_context == NULL) {
852 - tc_log_error(MOD_NAME, "Could not allocate enough memory.");
853 - return TC_IMPORT_ERROR;
854 -@@ -324,6 +375,7 @@ do_avi:
855 - // XXX: some codecs need extra data
856 - switch (codec->id)
857 - {
858 -+#if LIBAVCODEC_VERSION_MAJOR < 55
859 - case CODEC_ID_MJPEG: extra_data_size = 28; break;
860 - case CODEC_ID_LJPEG: extra_data_size = 28; break;
861 - case CODEC_ID_HUFFYUV: extra_data_size = 1000; break;
862 -@@ -331,6 +383,15 @@ do_avi:
863 - case CODEC_ID_ASV2: extra_data_size = 8; break;
864 - case CODEC_ID_WMV1: extra_data_size = 4; break;
865 - case CODEC_ID_WMV2: extra_data_size = 4; break;
866 -+#else
867 -+ case AV_CODEC_ID_MJPEG: extra_data_size = 28; break;
868 -+ case AV_CODEC_ID_LJPEG: extra_data_size = 28; break;
869 -+ case AV_CODEC_ID_HUFFYUV: extra_data_size = 1000; break;
870 -+ case AV_CODEC_ID_ASV1: extra_data_size = 8; break;
871 -+ case AV_CODEC_ID_ASV2: extra_data_size = 8; break;
872 -+ case AV_CODEC_ID_WMV1: extra_data_size = 4; break;
873 -+ case AV_CODEC_ID_WMV2: extra_data_size = 4; break;
874 -+#endif
875 - default: extra_data_size = 0; break;
876 - }
877 -
878 -@@ -344,7 +344,7 @@ do_avi:
879 - }
880 -
881 - TC_LOCK_LIBAVCODEC;
882 -- ret = avcodec_open(lavc_dec_context, lavc_dec_codec);
883 -+ ret = avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL);
884 - TC_UNLOCK_LIBAVCODEC;
885 - if (ret < 0) {
886 - tc_log_warn(MOD_NAME, "Could not initialize the '%s' codec.",
887 -@@ -360,7 +421,11 @@ do_avi:
888 - frame_size = x_dim*y_dim + 2*UV_PLANE_SIZE(IMG_YUV_DEFAULT,x_dim,y_dim);
889 -
890 - // we adapt the color space
891 -+#if LIBAVCODEC_VERSION_MAJOR < 55
892 - if(codec->id == CODEC_ID_MJPEG) {
893 -+#else
894 -+ if(codec->id == AV_CODEC_ID_MJPEG) {
895 -+#endif
896 - enable_levels_filter();
897 - }
898 - break;
899 -@@ -434,7 +499,11 @@ do_dv:
900 - }
901 -
902 - // we adapt the color space
903 -+#if LIBAVCODEC_VERSION_MAJOR < 55
904 - if(codec->id == CODEC_ID_MJPEG) {
905 -+#else
906 -+ if(codec->id == AV_CODEC_ID_MJPEG) {
907 -+#endif
908 - enable_levels_filter();
909 - }
910 -
911 -@@ -504,13 +573,25 @@ MOD_decode {
912 - int bkey = 0;
913 -
914 - // check for keyframes
915 -+#if LIBAVCODEC_VERSION_MAJOR < 55
916 - if (codec->id == CODEC_ID_MSMPEG4V3) {
917 -+#else
918 -+ if (codec->id == AV_CODEC_ID_MSMPEG4V3) {
919 -+#endif
920 - if (divx3_is_key(buffer)) bkey = 1;
921 - }
922 -+#if LIBAVCODEC_VERSION_MAJOR < 55
923 - else if (codec->id == CODEC_ID_MPEG4) {
924 -+#else
925 -+ else if (codec->id == AV_CODEC_ID_MPEG4) {
926 -+#endif
927 - if (mpeg4_is_key(buffer, bytes_read)) bkey = 1;
928 - }
929 -+#if LIBAVCODEC_VERSION_MAJOR < 55
930 - else if (codec->id == CODEC_ID_MJPEG) {
931 -+#else
932 -+ else if (codec->id == AV_CODEC_ID_MJPEG) {
933 -+#endif
934 - bkey = 1;
935 - }
936 -
937 ---- a/import/decode_lavc.c
938 -+++ b/import/decode_lavc.c
939 -@@ -57,6 +57,7 @@ struct ffmpeg_codec {
940 - };
941 -
942 - // fourCC to ID mapping taken from MPlayer's codecs.conf
943 -+#if LIBAVCODEC_VERSION_MAJOR < 55
944 - static struct ffmpeg_codec ffmpeg_codecs[] = {
945 - {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
946 - {"MP41", "DIV1", ""}},
947 -@@ -91,6 +92,42 @@ static struct ffmpeg_codec ffmpeg_codecs[] = {
948 - {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
949 - {"MPG2", ""}},
950 - {0, TC_CODEC_UNKNOWN, NULL, {""}}};
951 -+#else
952 -+static struct ffmpeg_codec ffmpeg_codecs[] = {
953 -+ {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
954 -+ {"MP41", "DIV1", ""}},
955 -+ {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
956 -+ {"MP42", "DIV2", ""}},
957 -+ {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
958 -+ {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}},
959 -+ {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
960 -+ {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}},
961 -+ {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
962 -+ {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}},
963 -+ {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPEG1VIDEO, "mpeg1video",
964 -+ {"MPG1", ""}},
965 -+ {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
966 -+ {"DVSD", ""}},
967 -+ {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
968 -+ {"WMV1", ""}},
969 -+ {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
970 -+ {"WMV2", ""}},
971 -+ {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
972 -+ {"HFYU", ""}},
973 -+ {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
974 -+ {"I263", ""}},
975 -+ {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
976 -+ {"H263", "U263", "VIV1", ""}},
977 -+ {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
978 -+ {"RV10", "RV13", ""}},
979 -+ {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
980 -+ {"SVQ1", ""}},
981 -+ {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
982 -+ {"SVQ3", ""}},
983 -+ {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
984 -+ {"MPG2", ""}},
985 -+ {0, TC_CODEC_UNKNOWN, NULL, {""}}};
986 -+#endif
987 -
988 -
989 - static struct ffmpeg_codec *find_ffmpeg_codec_id(unsigned int transcode_id)
990
991 diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg24.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg24.patch
992 deleted file mode 100644
993 index 57a91774abc..00000000000
994 --- a/media-video/transcode/files/transcode-1.1.7-ffmpeg24.patch
995 +++ /dev/null
996 @@ -1,18 +0,0 @@
997 -https://bugs.gentoo.org/show_bug.cgi?id=520190
998 -
999 -Index: transcode-1.1.7/import/probe_ffmpeg.c
1000 -===================================================================
1001 ---- transcode-1.1.7.orig/import/probe_ffmpeg.c
1002 -+++ transcode-1.1.7/import/probe_ffmpeg.c
1003 -@@ -120,7 +120,11 @@ void probe_ffmpeg(info_t *ipipe)
1004 -
1005 - translate_info(lavf_dmx_context, ipipe->probe_info);
1006 -
1007 -+#if LIBAVFORMAT_VERSION_INT > AV_VERSION_INT(53,25,0)
1008 -+ avformat_close_input(&lavf_dmx_context);
1009 -+#else
1010 - av_close_input_file(lavf_dmx_context);
1011 -+#endif
1012 - return;
1013 - }
1014 -
1015
1016 diff --git a/media-video/transcode/files/transcode-1.1.7-ffmpeg29.patch b/media-video/transcode/files/transcode-1.1.7-ffmpeg29.patch
1017 deleted file mode 100644
1018 index 7901fc3cc34..00000000000
1019 --- a/media-video/transcode/files/transcode-1.1.7-ffmpeg29.patch
1020 +++ /dev/null
1021 @@ -1,352 +0,0 @@
1022 -Index: transcode-1.1.7/encode/encode_lavc.c
1023 -===================================================================
1024 ---- transcode-1.1.7.orig/encode/encode_lavc.c
1025 -+++ transcode-1.1.7/encode/encode_lavc.c
1026 -@@ -233,7 +233,7 @@ static void pre_encode_video_yuv420p(TCL
1027 - vframe_list_t *vframe)
1028 - {
1029 - avpicture_fill((AVPicture *)&pd->ff_venc_frame, vframe->video_buf,
1030 -- PIX_FMT_YUV420P,
1031 -+ AV_PIX_FMT_YUV420P,
1032 - pd->ff_vcontext.width, pd->ff_vcontext.height);
1033 - }
1034 -
1035 -@@ -247,7 +247,7 @@ static void pre_encode_video_yuv420p_huf
1036 - IMG_YUV_DEFAULT,
1037 - pd->ff_vcontext.width, pd->ff_vcontext.height);
1038 - avpicture_fill((AVPicture *)&pd->ff_venc_frame, pd->vframe_buf->video_buf,
1039 -- PIX_FMT_YUV422P,
1040 -+ AV_PIX_FMT_YUV422P,
1041 - pd->ff_vcontext.width, pd->ff_vcontext.height);
1042 - ac_imgconvert(src, IMG_YUV_DEFAULT,
1043 - pd->ff_venc_frame.data, IMG_YUV422P,
1044 -@@ -263,7 +263,7 @@ static void pre_encode_video_yuv422p(TCL
1045 - IMG_YUV422P,
1046 - pd->ff_vcontext.width, pd->ff_vcontext.height);
1047 - avpicture_fill((AVPicture *)&pd->ff_venc_frame, pd->vframe_buf->video_buf,
1048 -- PIX_FMT_YUV420P,
1049 -+ AV_PIX_FMT_YUV420P,
1050 - pd->ff_vcontext.width, pd->ff_vcontext.height);
1051 - ac_imgconvert(src, IMG_YUV422P,
1052 - pd->ff_venc_frame.data, IMG_YUV420P,
1053 -@@ -275,7 +275,7 @@ static void pre_encode_video_yuv422p_huf
1054 - vframe_list_t *vframe)
1055 - {
1056 - avpicture_fill((AVPicture *)&pd->ff_venc_frame, vframe->video_buf,
1057 -- PIX_FMT_YUV422P,
1058 -+ AV_PIX_FMT_YUV422P,
1059 - pd->ff_vcontext.width, pd->ff_vcontext.height);
1060 -
1061 - }
1062 -@@ -285,7 +285,7 @@ static void pre_encode_video_rgb24(TCLav
1063 - vframe_list_t *vframe)
1064 - {
1065 - avpicture_fill((AVPicture *)&pd->ff_venc_frame, pd->vframe_buf->video_buf,
1066 -- PIX_FMT_YUV420P,
1067 -+ AV_PIX_FMT_YUV420P,
1068 - pd->ff_vcontext.width, pd->ff_vcontext.height);
1069 - ac_imgconvert(&vframe->video_buf, IMG_RGB_DEFAULT,
1070 - pd->ff_venc_frame.data, IMG_YUV420P,
1071 -@@ -610,21 +610,21 @@ static int tc_lavc_set_pix_fmt(TCLavcPri
1072 - case CODEC_YUV:
1073 - if (TC_VCODEC_ID(pd) == TC_CODEC_HUFFYUV) {
1074 - pd->tc_pix_fmt = TC_CODEC_YUV422P;
1075 -- pd->ff_vcontext.pix_fmt = PIX_FMT_YUV422P;
1076 -+ pd->ff_vcontext.pix_fmt = AV_PIX_FMT_YUV422P;
1077 - pd->pre_encode_video = pre_encode_video_yuv420p_huffyuv;
1078 - } else {
1079 - pd->tc_pix_fmt = TC_CODEC_YUV420P;
1080 - pd->ff_vcontext.pix_fmt = (TC_VCODEC_ID(pd) == TC_CODEC_MJPEG)
1081 -- ? PIX_FMT_YUVJ420P
1082 -- : PIX_FMT_YUV420P;
1083 -+ ? AV_PIX_FMT_YUVJ420P
1084 -+ : AV_PIX_FMT_YUV420P;
1085 - pd->pre_encode_video = pre_encode_video_yuv420p;
1086 - }
1087 - break;
1088 - case CODEC_YUV422:
1089 - pd->tc_pix_fmt = TC_CODEC_YUV422P;
1090 - pd->ff_vcontext.pix_fmt = (TC_VCODEC_ID(pd) == TC_CODEC_MJPEG)
1091 -- ? PIX_FMT_YUVJ422P
1092 -- : PIX_FMT_YUV422P;
1093 -+ ? AV_PIX_FMT_YUVJ422P
1094 -+ : AV_PIX_FMT_YUV422P;
1095 - if (TC_VCODEC_ID(pd) == TC_CODEC_HUFFYUV) {
1096 - pd->pre_encode_video = pre_encode_video_yuv422p_huffyuv;
1097 - } else {
1098 -@@ -634,10 +634,10 @@ static int tc_lavc_set_pix_fmt(TCLavcPri
1099 - case CODEC_RGB:
1100 - pd->tc_pix_fmt = TC_CODEC_RGB;
1101 - pd->ff_vcontext.pix_fmt = (TC_VCODEC_ID(pd) == TC_CODEC_HUFFYUV)
1102 -- ? PIX_FMT_YUV422P
1103 -+ ? AV_PIX_FMT_YUV422P
1104 - : (TC_VCODEC_ID(pd) == TC_CODEC_MJPEG)
1105 -- ? PIX_FMT_YUVJ420P
1106 -- : PIX_FMT_YUV420P;
1107 -+ ? AV_PIX_FMT_YUVJ420P
1108 -+ : AV_PIX_FMT_YUV420P;
1109 - pd->pre_encode_video = pre_encode_video_rgb24;
1110 - break;
1111 - default:
1112 -@@ -1390,7 +1390,7 @@ static int tc_lavc_configure(TCModuleIns
1113 - /* FIXME: move into core? */
1114 - TC_INIT_LIBAVCODEC;
1115 -
1116 -- avcodec_get_frame_defaults(&pd->ff_venc_frame);
1117 -+ av_frame_unref(&pd->ff_venc_frame);
1118 - /*
1119 - * auxiliary config data needs to be blanked too
1120 - * before any other operation
1121 -@@ -1523,6 +1523,8 @@ static int tc_lavc_encode_video(TCModule
1122 - vframe_list_t *outframe)
1123 - {
1124 - TCLavcPrivateData *pd = NULL;
1125 -+ AVPacket pkt;
1126 -+ int ret, got_packet = 0;
1127 -
1128 - TC_MODULE_SELF_CHECK(self, "encode_video");
1129 -
1130 -@@ -1537,12 +1539,15 @@ static int tc_lavc_encode_video(TCModule
1131 -
1132 - pd->pre_encode_video(pd, inframe);
1133 -
1134 -+ av_init_packet(&pkt);
1135 -+ pkt.data = outframe->video_buf;
1136 -+ pkt.size = inframe->video_size;
1137 -+
1138 - TC_LOCK_LIBAVCODEC;
1139 -- outframe->video_len = avcodec_encode_video(&pd->ff_vcontext,
1140 -- outframe->video_buf,
1141 -- inframe->video_size,
1142 -- &pd->ff_venc_frame);
1143 -+ ret = avcodec_encode_video2(&pd->ff_vcontext, &pkt,
1144 -+ &pd->ff_venc_frame, &got_packet);
1145 - TC_UNLOCK_LIBAVCODEC;
1146 -+ outframe->video_len = ret ? ret : pkt.size;
1147 -
1148 - if (outframe->video_len < 0) {
1149 - tc_log_warn(MOD_NAME, "encoder error: size (%i)",
1150 -Index: transcode-1.1.7/export/export_ffmpeg.c
1151 -===================================================================
1152 ---- transcode-1.1.7.orig/export/export_ffmpeg.c
1153 -+++ transcode-1.1.7/export/export_ffmpeg.c
1154 -@@ -250,9 +250,9 @@ int opt_default(const char *opt, const c
1155 - for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){
1156 - /* GLUE: +if */
1157 - if (type == AVMEDIA_TYPE_VIDEO) {
1158 -- const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
1159 -- if(o2)
1160 -- ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
1161 -+ o = av_opt_find(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
1162 -+ if(o)
1163 -+ ret = av_opt_set(avcodec_opts[type], opt, arg, 0);
1164 - /* GLUE: +if */
1165 - }
1166 - }
1167 -@@ -267,7 +267,10 @@ int opt_default(const char *opt, const c
1168 - if(opt[0] == 'a')
1169 - ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
1170 - else */ if(opt[0] == 'v')
1171 -- ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
1172 -+ {
1173 -+ o = av_opt_find(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, NULL, 0, 0);
1174 -+ ret = av_opt_set(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 0);
1175 -+ }
1176 - /* GLUE: disabling
1177 - else if(opt[0] == 's')
1178 - ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
1179 -@@ -487,10 +490,10 @@ MOD_init
1180 - }
1181 -
1182 - lavc_venc_context = avcodec_alloc_context3(lavc_venc_codec);
1183 -- lavc_venc_frame = avcodec_alloc_frame();
1184 -+ lavc_venc_frame = av_frame_alloc();
1185 -
1186 -- lavc_convert_frame= avcodec_alloc_frame();
1187 -- size = avpicture_get_size(PIX_FMT_RGB24, vob->ex_v_width, vob->ex_v_height);
1188 -+ lavc_convert_frame= av_frame_alloc();
1189 -+ size = avpicture_get_size(AV_PIX_FMT_RGB24, vob->ex_v_width, vob->ex_v_height);
1190 - enc_buffer = tc_malloc(size);
1191 -
1192 - if (lavc_venc_context == NULL || !enc_buffer || !lavc_convert_frame) {
1193 -@@ -1114,7 +1117,7 @@ MOD_init
1194 - lavc_venc_context->prediction_method = lavc_param_prediction_method;
1195 -
1196 - if(is_huffyuv)
1197 -- lavc_venc_context->pix_fmt = PIX_FMT_YUV422P;
1198 -+ lavc_venc_context->pix_fmt = AV_PIX_FMT_YUV422P;
1199 - else
1200 - {
1201 - switch(pix_fmt)
1202 -@@ -1123,18 +1126,18 @@ MOD_init
1203 - case CODEC_RGB:
1204 - {
1205 - if(is_mjpeg)
1206 -- lavc_venc_context->pix_fmt = PIX_FMT_YUVJ420P;
1207 -+ lavc_venc_context->pix_fmt = AV_PIX_FMT_YUVJ420P;
1208 - else
1209 -- lavc_venc_context->pix_fmt = PIX_FMT_YUV420P;
1210 -+ lavc_venc_context->pix_fmt = AV_PIX_FMT_YUV420P;
1211 - break;
1212 - }
1213 -
1214 - case CODEC_YUV422:
1215 - {
1216 - if(is_mjpeg)
1217 -- lavc_venc_context->pix_fmt = PIX_FMT_YUVJ422P;
1218 -+ lavc_venc_context->pix_fmt = AV_PIX_FMT_YUVJ422P;
1219 - else
1220 -- lavc_venc_context->pix_fmt = PIX_FMT_YUV422P;
1221 -+ lavc_venc_context->pix_fmt = AV_PIX_FMT_YUV422P;
1222 - break;
1223 - }
1224 -
1225 -@@ -1596,6 +1599,8 @@ MOD_encode
1226 -
1227 - int out_size;
1228 - const char pict_type_char[5]= {'?', 'I', 'P', 'B', 'S'};
1229 -+ AVPacket pkt;
1230 -+ int ret, got_packet = 0;
1231 -
1232 - if (param->flag == TC_VIDEO) {
1233 -
1234 -@@ -1620,7 +1625,7 @@ MOD_encode
1235 - YUV_INIT_PLANES(src, param->buffer, IMG_YUV_DEFAULT,
1236 - lavc_venc_context->width, lavc_venc_context->height);
1237 - avpicture_fill((AVPicture *)lavc_venc_frame, img_buffer,
1238 -- PIX_FMT_YUV422P, lavc_venc_context->width,
1239 -+ AV_PIX_FMT_YUV422P, lavc_venc_context->width,
1240 - lavc_venc_context->height);
1241 - /* FIXME: can't use tcv_convert (see decode_lavc.c) */
1242 - ac_imgconvert(src, IMG_YUV_DEFAULT,
1243 -@@ -1650,7 +1655,7 @@ MOD_encode
1244 - lavc_venc_context->width,
1245 - lavc_venc_context->height);
1246 - avpicture_fill((AVPicture *)lavc_venc_frame, img_buffer,
1247 -- PIX_FMT_YUV420P, lavc_venc_context->width,
1248 -+ AV_PIX_FMT_YUV420P, lavc_venc_context->width,
1249 - lavc_venc_context->height);
1250 - ac_imgconvert(src, IMG_YUV422P,
1251 - lavc_venc_frame->data, IMG_YUV420P,
1252 -@@ -1661,7 +1666,7 @@ MOD_encode
1253 -
1254 - case CODEC_RGB:
1255 - avpicture_fill((AVPicture *)lavc_venc_frame, img_buffer,
1256 -- PIX_FMT_YUV420P, lavc_venc_context->width,
1257 -+ AV_PIX_FMT_YUV420P, lavc_venc_context->width,
1258 - lavc_venc_context->height);
1259 - ac_imgconvert(&param->buffer, IMG_RGB_DEFAULT,
1260 - lavc_venc_frame->data, IMG_YUV420P,
1261 -@@ -1674,13 +1679,17 @@ MOD_encode
1262 - return TC_EXPORT_ERROR;
1263 - }
1264 -
1265 -+ av_init_packet(&pkt);
1266 -+ pkt.data = enc_buffer;
1267 -+ pkt.size = size;
1268 -
1269 - TC_LOCK_LIBAVCODEC;
1270 -- out_size = avcodec_encode_video(lavc_venc_context,
1271 -- enc_buffer, size,
1272 -- lavc_venc_frame);
1273 -+ ret = avcodec_encode_video2(lavc_venc_context, &pkt,
1274 -+ lavc_venc_frame, &got_packet);
1275 - TC_UNLOCK_LIBAVCODEC;
1276 -
1277 -+ out_size = ret ? ret : pkt.size;
1278 -+
1279 - if (out_size < 0) {
1280 - tc_log_warn(MOD_NAME, "encoder error: size (%d)", out_size);
1281 - return TC_EXPORT_ERROR;
1282 -Index: transcode-1.1.7/import/decode_lavc.c
1283 -===================================================================
1284 ---- transcode-1.1.7.orig/import/decode_lavc.c
1285 -+++ transcode-1.1.7/import/decode_lavc.c
1286 -@@ -327,8 +327,8 @@ void decode_lavc(decode_t *decode)
1287 -
1288 - // Convert avcodec image to the requested YUV or RGB format
1289 - switch (lavc_dec_context->pix_fmt) {
1290 -- case PIX_FMT_YUVJ420P:
1291 -- case PIX_FMT_YUV420P:
1292 -+ case AV_PIX_FMT_YUVJ420P:
1293 -+ case AV_PIX_FMT_YUV420P:
1294 - // Remove "dead space" at right edge of planes, if any
1295 - if (picture.linesize[0] != lavc_dec_context->width) {
1296 - int y;
1297 -@@ -352,7 +352,7 @@ void decode_lavc(decode_t *decode)
1298 - pix_fmt==TC_CODEC_YUV420P ? IMG_YUV420P : IMG_RGB_DEFAULT,
1299 - lavc_dec_context->width, lavc_dec_context->height);
1300 - break;
1301 -- case PIX_FMT_YUV411P:
1302 -+ case AV_PIX_FMT_YUV411P:
1303 - if (picture.linesize[0] != lavc_dec_context->width) {
1304 - int y;
1305 - for (y = 0; y < lavc_dec_context->height; y++) {
1306 -@@ -371,8 +371,8 @@ void decode_lavc(decode_t *decode)
1307 - pix_fmt==TC_CODEC_YUV420P ? IMG_YUV420P : IMG_RGB_DEFAULT,
1308 - lavc_dec_context->width, lavc_dec_context->height);
1309 - break;
1310 -- case PIX_FMT_YUVJ422P:
1311 -- case PIX_FMT_YUV422P:
1312 -+ case AV_PIX_FMT_YUVJ422P:
1313 -+ case AV_PIX_FMT_YUV422P:
1314 - if (picture.linesize[0] != lavc_dec_context->width) {
1315 - int y;
1316 - for (y = 0; y < lavc_dec_context->height; y++) {
1317 -@@ -391,8 +391,8 @@ void decode_lavc(decode_t *decode)
1318 - pix_fmt==TC_CODEC_YUV420P ? IMG_YUV420P : IMG_RGB_DEFAULT,
1319 - lavc_dec_context->width, lavc_dec_context->height);
1320 - break;
1321 -- case PIX_FMT_YUVJ444P:
1322 -- case PIX_FMT_YUV444P:
1323 -+ case AV_PIX_FMT_YUVJ444P:
1324 -+ case AV_PIX_FMT_YUV444P:
1325 - if (picture.linesize[0] != lavc_dec_context->width) {
1326 - int y;
1327 - for (y = 0; y < lavc_dec_context->height; y++) {
1328 -Index: transcode-1.1.7/import/import_ffmpeg.c
1329 -===================================================================
1330 ---- transcode-1.1.7.orig/import/import_ffmpeg.c
1331 -+++ transcode-1.1.7/import/import_ffmpeg.c
1332 -@@ -661,8 +661,8 @@ retry:
1333 -
1334 - // Convert avcodec image to our internal YUV or RGB format
1335 - switch (lavc_dec_context->pix_fmt) {
1336 -- case PIX_FMT_YUVJ420P:
1337 -- case PIX_FMT_YUV420P:
1338 -+ case AV_PIX_FMT_YUVJ420P:
1339 -+ case AV_PIX_FMT_YUV420P:
1340 - src_fmt = IMG_YUV420P;
1341 - YUV_INIT_PLANES(src_planes, frame, src_fmt,
1342 - lavc_dec_context->width, lavc_dec_context->height);
1343 -@@ -693,7 +693,7 @@ retry:
1344 - }
1345 - break;
1346 -
1347 -- case PIX_FMT_YUV411P:
1348 -+ case AV_PIX_FMT_YUV411P:
1349 - src_fmt = IMG_YUV411P;
1350 - YUV_INIT_PLANES(src_planes, frame, src_fmt,
1351 - lavc_dec_context->width, lavc_dec_context->height);
1352 -@@ -721,8 +721,8 @@ retry:
1353 - }
1354 - break;
1355 -
1356 -- case PIX_FMT_YUVJ422P:
1357 -- case PIX_FMT_YUV422P:
1358 -+ case AV_PIX_FMT_YUVJ422P:
1359 -+ case AV_PIX_FMT_YUV422P:
1360 - src_fmt = IMG_YUV422P;
1361 - YUV_INIT_PLANES(src_planes, frame, src_fmt,
1362 - lavc_dec_context->width, lavc_dec_context->height);
1363 -@@ -750,8 +750,8 @@ retry:
1364 - }
1365 - break;
1366 -
1367 -- case PIX_FMT_YUVJ444P:
1368 -- case PIX_FMT_YUV444P:
1369 -+ case AV_PIX_FMT_YUVJ444P:
1370 -+ case AV_PIX_FMT_YUV444P:
1371 - src_fmt = IMG_YUV444P;
1372 - YUV_INIT_PLANES(src_planes, frame, src_fmt,
1373 - lavc_dec_context->width, lavc_dec_context->height);
1374
1375 diff --git a/media-video/transcode/files/transcode-1.1.7-freetype251.patch b/media-video/transcode/files/transcode-1.1.7-freetype251.patch
1376 deleted file mode 100644
1377 index 59c6ab35a51..00000000000
1378 --- a/media-video/transcode/files/transcode-1.1.7-freetype251.patch
1379 +++ /dev/null
1380 @@ -1,12 +0,0 @@
1381 ---- transcode-1.1.7/filter/subtitler/load_font.c
1382 -+++ transcode-1.1.7/filter/subtitler/load_font.c
1383 -@@ -47,8 +47,8 @@
1384 - // FreeType specific includes
1385 - #include <ft2build.h>
1386 - #include FT_FREETYPE_H
1387 -+#include FT_GLYPH_H
1388 -
1389 --#include <freetype/ftglyph.h>
1390 -
1391 - /**
1392 - * @file bswap.h
1393
1394 diff --git a/media-video/transcode/files/transcode-1.1.7-libav-10.patch b/media-video/transcode/files/transcode-1.1.7-libav-10.patch
1395 deleted file mode 100644
1396 index 1f4a24039d7..00000000000
1397 --- a/media-video/transcode/files/transcode-1.1.7-libav-10.patch
1398 +++ /dev/null
1399 @@ -1,36 +0,0 @@
1400 -fix building w/libav-10
1401 -
1402 -https://wiki.libav.org/Migration/10
1403 -
1404 ---- a/filter/filter_resample.c
1405 -+++ b/filter/filter_resample.c
1406 -@@ -37,6 +37,7 @@
1407 - #include "libtc/optstr.h"
1408 - #include "libtc/tcavcodec.h"
1409 - #include "libtc/tcmodule-plugin.h"
1410 -+#include <libavresample/avresample.h>
1411 -
1412 -
1413 - typedef struct {
1414 -@@ -45,7 +46,7 @@ typedef struct {
1415 -
1416 - int bytes_per_sample;
1417 -
1418 -- ReSampleContext *resample_ctx;
1419 -+ AVAudioResampleContext *resample_ctx;
1420 - } ResamplePrivateData;
1421 -
1422 - static const char resample_help[] = ""
1423 ---- a/import/probe_ffmpeg.c
1424 -+++ b/import/probe_ffmpeg.c
1425 -@@ -51,8 +51,8 @@ static void translate_info(const AVFormatContext *ctx, ProbeInfo *info)
1426 - info->bitrate = st->codec->bit_rate / 1000;
1427 - info->width = st->codec->width;
1428 - info->height = st->codec->height;
1429 -- if (st->r_frame_rate.num > 0 && st->r_frame_rate.den > 0) {
1430 -- info->fps = av_q2d(st->r_frame_rate);
1431 -+ if (st->avg_frame_rate.num > 0 && st->avg_frame_rate.den > 0) {
1432 -+ info->fps = av_q2d(st->avg_frame_rate);
1433 - } else {
1434 - /* watch out here */
1435 - info->fps = 1.0/av_q2d(st->codec->time_base);
1436
1437 diff --git a/media-video/transcode/files/transcode-1.1.7-libav-9.patch b/media-video/transcode/files/transcode-1.1.7-libav-9.patch
1438 deleted file mode 100644
1439 index a67fb68c698..00000000000
1440 --- a/media-video/transcode/files/transcode-1.1.7-libav-9.patch
1441 +++ /dev/null
1442 @@ -1,31 +0,0 @@
1443 ---- a/import/probe_ffmpeg.c
1444 -+++ b/import/probe_ffmpeg.c
1445 -@@ -109,7 +109,7 @@ void probe_ffmpeg(info_t *ipipe)
1446 - return;
1447 - }
1448 -
1449 -- ret = av_find_stream_info(lavf_dmx_context);
1450 -+ ret = avformat_find_stream_info(lavf_dmx_context, NULL);
1451 - if (ret < 0) {
1452 - tc_log_error(__FILE__, "unable to fetch informations from '%s'"
1453 - " (libavformat failure)",
1454 ---- a/import/decode_lavc.c
1455 -+++ b/import/decode_lavc.c
1456 -@@ -170,7 +170,7 @@ void decode_lavc(decode_t *decode)
1457 -
1458 - // Set these to the expected values so that ffmpeg's decoder can
1459 - // properly detect interlaced input.
1460 -- lavc_dec_context = avcodec_alloc_context();
1461 -+ lavc_dec_context = avcodec_alloc_context3(NULL);
1462 - if (lavc_dec_context == NULL) {
1463 - tc_log_error(__FILE__, "Could not allocate enough memory.");
1464 - goto decoder_error;
1465 -@@ -186,7 +186,7 @@ void decode_lavc(decode_t *decode)
1466 - lavc_dec_context->error_concealment = 3;
1467 - lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
1468 -
1469 -- if (avcodec_open(lavc_dec_context, lavc_dec_codec) < 0) {
1470 -+ if (avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL) < 0) {
1471 - tc_log_error(__FILE__, "Could not initialize the '%s' codec.",
1472 - codec->name);
1473 - goto decoder_error;
1474
1475 diff --git a/media-video/transcode/files/transcode-1.1.7-preset-force.patch b/media-video/transcode/files/transcode-1.1.7-preset-force.patch
1476 deleted file mode 100644
1477 index 0d1da8b4f66..00000000000
1478 --- a/media-video/transcode/files/transcode-1.1.7-preset-force.patch
1479 +++ /dev/null
1480 @@ -1,28 +0,0 @@
1481 -Do not force using a preset. Do not try to open non-existant preset by default.
1482 -
1483 -Index: transcode-1.1.7/export/export_ffmpeg.c
1484 -===================================================================
1485 ---- transcode-1.1.7.orig/export/export_ffmpeg.c
1486 -+++ transcode-1.1.7/export/export_ffmpeg.c
1487 -@@ -1206,7 +1206,7 @@ MOD_init
1488 - lavc_venc_context->me_method = ME_ZERO + lavc_param_vme;
1489 -
1490 - /* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
1491 -- if (lavc_param_video_preset) {
1492 -+ if (lavc_param_video_preset && strcmp(lavc_param_video_preset, "none")) {
1493 - avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
1494 - video_codec_name = av_strdup(ffmpeg_codec_name(codec->name));
1495 -
1496 -Index: transcode-1.1.7/export/ffmpeg_cfg.c
1497 -===================================================================
1498 ---- transcode-1.1.7.orig/export/ffmpeg_cfg.c
1499 -+++ transcode-1.1.7/export/ffmpeg_cfg.c
1500 -@@ -124,7 +124,7 @@ int lavc_param_gmc = 0;
1501 - //int lavc_param_atag = 0;
1502 - //int lavc_param_abitrate = 224;
1503 -
1504 --char *lavc_param_video_preset = "medium";
1505 -+char *lavc_param_video_preset = "none";
1506 - char *lavc_param_ffmpeg_datadir = "/usr/share/ffmpeg";
1507 -
1508 - TCConfigEntry lavcopts_conf[]={
1509
1510 diff --git a/media-video/transcode/files/transcode-1.1.7-preset-free.patch b/media-video/transcode/files/transcode-1.1.7-preset-free.patch
1511 deleted file mode 100644
1512 index 00494b94ba9..00000000000
1513 --- a/media-video/transcode/files/transcode-1.1.7-preset-free.patch
1514 +++ /dev/null
1515 @@ -1,34 +0,0 @@
1516 -Fix invalid free when preset file not found
1517 -https://bugs.gentoo.org/show_bug.cgi?id=322945
1518 -Author: Brennan Shacklett
1519 -
1520 -diff -urN transcode-1.1.7-orig/export/export_ffmpeg.c transcode-1.1.7/export/export_ffmpeg.c
1521 ---- transcode-1.1.7-orig/export/export_ffmpeg.c 2011-11-19 08:50:27.000000000 -0800
1522 -+++ transcode-1.1.7/export/export_ffmpeg.c 2012-07-03 20:07:05.669083945 -0700
1523 -@@ -321,7 +321,7 @@
1524 - }
1525 -
1526 - if(!f){
1527 -- fprintf(stderr, "File for preset '%s' not found\n", arg);
1528 -+ tc_log_error(MOD_NAME, "File for preset '%s' not found", arg);
1529 - av_exit(1);
1530 - }
1531 -
1532 -@@ -1207,7 +1207,7 @@
1533 - /* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
1534 - if (lavc_param_video_preset) {
1535 - avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
1536 -- video_codec_name = ffmpeg_codec_name(codec->name);
1537 -+ video_codec_name = av_strdup(ffmpeg_codec_name(codec->name));
1538 -
1539 - const char *preset_start = lavc_param_video_preset;
1540 - while (preset_start) {
1541 -@@ -1225,6 +1225,8 @@
1542 - if (opt_preset("vpre", preset_name) != 0) {
1543 - tc_log_warn(MOD_NAME, "Parsing ffmpeg preset '%s' failed", preset_name);
1544 - }
1545 -+ av_free(video_codec_name);
1546 -+ video_codec_name = NULL;
1547 - if (verbose) {
1548 - int i;
1549 - tc_log_info(MOD_NAME, "After parsing preset '%s', %i options are overridden:", preset_name, opt_name_count);
1550
1551 diff --git a/media-video/transcode/transcode-1.1.7-r3.ebuild b/media-video/transcode/transcode-1.1.7-r3.ebuild
1552 index 3c0ba6e98ec..a5df574512d 100644
1553 --- a/media-video/transcode/transcode-1.1.7-r3.ebuild
1554 +++ b/media-video/transcode/transcode-1.1.7-r3.ebuild
1555 @@ -7,7 +7,7 @@ inherit autotools libtool multilib
1556 DESCRIPTION="A suite of utilities for transcoding video and audio codecs in different containers"
1557 HOMEPAGE="http://www.transcoding.org/ https://bitbucket.org/france/transcode-tcforge"
1558 SRC_URI="https://www.bitbucket.org/france/${PN}-tcforge/downloads/${P}.tar.bz2
1559 - https://dev.gentoo.org/~polynomial-c/${P}-imagemagick7.patch"
1560 + https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2"
1561
1562 LICENSE="GPL-2"
1563 SLOT="0"
1564 @@ -56,26 +56,26 @@ REQUIRED_USE="
1565 "
1566
1567 PATCHES=(
1568 - "${FILESDIR}"/${P}-ffmpeg.patch
1569 - "${FILESDIR}"/${P}-ffmpeg-0.10.patch
1570 - "${FILESDIR}"/${P}-ffmpeg-0.11.patch
1571 - "${FILESDIR}"/${P}-preset-free.patch
1572 - "${FILESDIR}"/${P}-libav-9.patch
1573 - "${FILESDIR}"/${P}-libav-10.patch
1574 - "${FILESDIR}"/${P}-preset-force.patch
1575 - "${FILESDIR}"/${P}-ffmpeg2.patch
1576 - "${FILESDIR}"/${P}-freetype251.patch
1577 - "${FILESDIR}"/${P}-ffmpeg24.patch
1578 + "${WORKDIR}"/${P}-patchset/${P}-ffmpeg.patch
1579 + "${WORKDIR}"/${P}-patchset/${P}-ffmpeg-0.10.patch
1580 + "${WORKDIR}"/${P}-patchset/${P}-ffmpeg-0.11.patch
1581 + "${WORKDIR}"/${P}-patchset/${P}-preset-free.patch
1582 + "${WORKDIR}"/${P}-patchset/${P}-libav-9.patch
1583 + "${WORKDIR}"/${P}-patchset/${P}-libav-10.patch
1584 + "${WORKDIR}"/${P}-patchset/${P}-preset-force.patch
1585 + "${WORKDIR}"/${P}-patchset/${P}-ffmpeg2.patch
1586 + "${WORKDIR}"/${P}-patchset/${P}-freetype251.patch
1587 + "${WORKDIR}"/${P}-patchset/${P}-ffmpeg24.patch
1588 )
1589
1590 src_prepare() {
1591 if has_version '>=media-video/ffmpeg-2.8' ||
1592 has_version '>=media-video/libav-12'; then
1593 - PATCHES+=( "${FILESDIR}"/${P}-ffmpeg29.patch )
1594 + PATCHES+=( "${WORKDIR}"/${P}-patchset/${P}-ffmpeg29.patch )
1595 fi
1596
1597 if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
1598 - PATCHES+=( "${DISTDIR}"/${P}-imagemagick7.patch )
1599 + PATCHES+=( "${WORKDIR}"/${P}-patchset/${P}-imagemagick7.patch )
1600 fi
1601
1602 default