1 |
commit: e08d185d64510c41d4b43642a20690896fe0b094 |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Feb 3 19:56:57 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 8 19:15:34 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e08d185d |
7 |
|
8 |
media-video/mplayer: remove unused patches |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/7041 |
11 |
|
12 |
.../mplayer/files/mplayer-1.2-get_buffer.patch | 327 --------------------- |
13 |
.../files/mplayer-1.2_pre20150730-chan.patch | 25 -- |
14 |
.../files/mplayer-1.2_pre20150730-encode.patch | 82 ------ |
15 |
3 files changed, 434 deletions(-) |
16 |
|
17 |
diff --git a/media-video/mplayer/files/mplayer-1.2-get_buffer.patch b/media-video/mplayer/files/mplayer-1.2-get_buffer.patch |
18 |
deleted file mode 100644 |
19 |
index 3329b980360..00000000000 |
20 |
--- a/media-video/mplayer/files/mplayer-1.2-get_buffer.patch |
21 |
+++ /dev/null |
22 |
@@ -1,327 +0,0 @@ |
23 |
-r37476 | rtogni | 2015-09-05 18:20:27 +0200 (Sat, 05 Sep 2015) | 5 lines |
24 |
- |
25 |
-Replace deprecated get_buffer, buffer_hints, and others |
26 |
- |
27 |
-This is needed to compile with latest FFmpeg |
28 |
- |
29 |
-Index: libmpcodecs/vd_ffmpeg.c |
30 |
-=================================================================== |
31 |
---- libmpcodecs/vd_ffmpeg.c (revision 37475) |
32 |
-+++ libmpcodecs/vd_ffmpeg.c (revision 37476) |
33 |
-@@ -40,6 +40,7 @@ |
34 |
- #if CONFIG_VDPAU |
35 |
- #include "libavcodec/vdpau.h" |
36 |
- #endif |
37 |
-+#include "libavutil/pixdesc.h" |
38 |
- |
39 |
- static const vd_info_t info = { |
40 |
- "FFmpeg's libavcodec codec family", |
41 |
-@@ -95,8 +96,11 @@ |
42 |
- |
43 |
- #include "m_option.h" |
44 |
- |
45 |
--static int get_buffer(AVCodecContext *avctx, AVFrame *pic); |
46 |
-+static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference); |
47 |
-+static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame); |
48 |
-+static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags); |
49 |
- static void release_buffer(AVCodecContext *avctx, AVFrame *pic); |
50 |
-+static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic); |
51 |
- static void draw_slice(struct AVCodecContext *s, const AVFrame *src, int offset[4], |
52 |
- int y, int type, int height); |
53 |
- |
54 |
-@@ -269,19 +273,10 @@ |
55 |
- if (lavc_param_vismv || (lavc_param_debug & (FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP))) { |
56 |
- ctx->do_slices = ctx->do_dr1 = 0; |
57 |
- } |
58 |
--#ifndef CODEC_FLAG_EMU_EDGE |
59 |
--#define CODEC_FLAG_EMU_EDGE 0 |
60 |
--#endif |
61 |
- if(ctx->do_dr1){ |
62 |
-- avctx->flags |= CODEC_FLAG_EMU_EDGE; |
63 |
-- avctx-> reget_buffer = |
64 |
-- avctx-> get_buffer = get_buffer; |
65 |
-- avctx->release_buffer = release_buffer; |
66 |
-+ avctx->get_buffer2 = get_buffer2; |
67 |
- } else if (lavc_codec->capabilities & CODEC_CAP_DR1) { |
68 |
-- avctx->flags &= ~CODEC_FLAG_EMU_EDGE; |
69 |
-- avctx-> reget_buffer = avcodec_default_reget_buffer; |
70 |
-- avctx-> get_buffer = avcodec_default_get_buffer; |
71 |
-- avctx->release_buffer = avcodec_default_release_buffer; |
72 |
-+ avctx->get_buffer2 = avcodec_default_get_buffer2; |
73 |
- } |
74 |
- avctx->slice_flags = 0; |
75 |
- } |
76 |
-@@ -309,9 +304,7 @@ |
77 |
- if (IMGFMT_IS_HWACCEL(imgfmt)) { |
78 |
- ctx->do_dr1 = 1; |
79 |
- ctx->nonref_dr = 0; |
80 |
-- avctx->get_buffer = get_buffer; |
81 |
-- avctx->release_buffer = release_buffer; |
82 |
-- avctx->reget_buffer = get_buffer; |
83 |
-+ avctx->get_buffer2 = get_buffer2; |
84 |
- mp_msg(MSGT_DECVIDEO, MSGL_V, IMGFMT_IS_XVMC(imgfmt) ? |
85 |
- MSGTR_MPCODECS_XVMCAcceleratedMPEG2 : |
86 |
- "[VD_FFMPEG] VDPAU accelerated decoding\n"); |
87 |
-@@ -384,7 +377,6 @@ |
88 |
- #endif |
89 |
- avctx->flags2|= lavc_param_fast; |
90 |
- avctx->codec_tag= sh->format; |
91 |
-- avctx->stream_codec_tag= sh->video.fccHandler; |
92 |
- avctx->idct_algo= lavc_param_idct_algo; |
93 |
- avctx->error_concealment= lavc_param_error_concealment; |
94 |
- avctx->debug= lavc_param_debug; |
95 |
-@@ -668,7 +660,7 @@ |
96 |
- return 0; |
97 |
- } |
98 |
- |
99 |
--static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ |
100 |
-+static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference){ |
101 |
- sh_video_t *sh = avctx->opaque; |
102 |
- vd_ffmpeg_ctx *ctx = sh->context; |
103 |
- mp_image_t *mpi=NULL; |
104 |
-@@ -677,27 +669,12 @@ |
105 |
- int width = FFMAX(avctx->width, -(-avctx->coded_width >> avctx->lowres)); |
106 |
- int height= FFMAX(avctx->height, -(-avctx->coded_height >> avctx->lowres)); |
107 |
- // special case to handle reget_buffer |
108 |
-- if (pic->opaque && pic->data[0] && (!pic->buffer_hints || pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE)) |
109 |
-+ if (pic->opaque && pic->data[0]) |
110 |
- return 0; |
111 |
- avcodec_align_dimensions(avctx, &width, &height); |
112 |
- //printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count); |
113 |
- |
114 |
-- if (pic->buffer_hints) { |
115 |
-- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Buffer hints: %u\n", pic->buffer_hints); |
116 |
-- type = MP_IMGTYPE_TEMP; |
117 |
-- if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE) |
118 |
-- flags |= MP_IMGFLAG_READABLE; |
119 |
-- if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE || |
120 |
-- pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) { |
121 |
-- ctx->ip_count++; |
122 |
-- type = MP_IMGTYPE_IP; |
123 |
-- flags |= MP_IMGFLAG_PRESERVE; |
124 |
-- } |
125 |
-- flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ? |
126 |
-- MP_IMGFLAG_DRAW_CALLBACK:0; |
127 |
-- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type == MP_IMGTYPE_IP ? "using IP\n" : "using TEMP\n"); |
128 |
-- } else { |
129 |
-- if(!pic->reference){ |
130 |
-+ if(!isreference){ |
131 |
- ctx->b_count++; |
132 |
- flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ? |
133 |
- MP_IMGFLAG_DRAW_CALLBACK:0; |
134 |
-@@ -711,11 +688,10 @@ |
135 |
- }else{ |
136 |
- type= MP_IMGTYPE_IP; |
137 |
- } |
138 |
-- } |
139 |
- |
140 |
- if (ctx->nonref_dr) { |
141 |
- if (flags & MP_IMGFLAG_PRESERVE) |
142 |
-- return avcodec_default_get_buffer(avctx, pic); |
143 |
-+ return mpcodec_default_get_buffer(avctx, pic); |
144 |
- // Use NUMBERED since for e.g. TEMP vos assume there will |
145 |
- // be no other frames between the get_image and matching put_image. |
146 |
- type = MP_IMGTYPE_NUMBERED; |
147 |
-@@ -722,7 +698,6 @@ |
148 |
- } |
149 |
- |
150 |
- if(init_vo(sh, avctx->pix_fmt, 1) < 0){ |
151 |
-- avctx->release_buffer= avcodec_default_release_buffer; |
152 |
- goto disable_dr1; |
153 |
- } |
154 |
- |
155 |
-@@ -822,7 +797,6 @@ |
156 |
- else |
157 |
- printf("."); |
158 |
- #endif |
159 |
-- pic->type= FF_BUFFER_TYPE_USER; |
160 |
- return 0; |
161 |
- |
162 |
- disable_dr1: |
163 |
-@@ -829,13 +803,11 @@ |
164 |
- ctx->do_dr1 = 0; |
165 |
- // For frame-multithreading these contexts aren't |
166 |
- // the same and must both be updated. |
167 |
-- ctx->avctx->get_buffer = |
168 |
-- avctx->get_buffer = avcodec_default_get_buffer; |
169 |
-- ctx->avctx->reget_buffer = |
170 |
-- avctx->reget_buffer = avcodec_default_reget_buffer; |
171 |
-+ ctx->avctx->get_buffer2 = |
172 |
-+ avctx->get_buffer2 = avcodec_default_get_buffer2; |
173 |
- if (pic->data[0]) |
174 |
-- release_buffer(avctx, pic); |
175 |
-- return avctx->get_buffer(avctx, pic); |
176 |
-+ mpcodec_default_release_buffer(avctx, pic); |
177 |
-+ return avctx->get_buffer2(avctx, pic,0); |
178 |
- } |
179 |
- |
180 |
- static void release_buffer(struct AVCodecContext *avctx, AVFrame *pic){ |
181 |
-@@ -843,8 +815,8 @@ |
182 |
- sh_video_t *sh = avctx->opaque; |
183 |
- vd_ffmpeg_ctx *ctx = sh->context; |
184 |
- int i; |
185 |
-- if (pic->type != FF_BUFFER_TYPE_USER) { |
186 |
-- avcodec_default_release_buffer(avctx, pic); |
187 |
-+ if (pic->opaque == NULL) { |
188 |
-+ mpcodec_default_release_buffer(avctx, pic); |
189 |
- return; |
190 |
- } |
191 |
- |
192 |
-@@ -954,7 +926,7 @@ |
193 |
- // even when we do dr we might actually get a buffer we had |
194 |
- // FFmpeg allocate - this mostly happens with nonref_dr. |
195 |
- // Ensure we treat it correctly. |
196 |
-- dr1= ctx->do_dr1 && pic->type == FF_BUFFER_TYPE_USER; |
197 |
-+ dr1= ctx->do_dr1 && pic->opaque != NULL; |
198 |
- if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n"); |
199 |
- //printf("repeat: %d\n", pic->repeat_pict); |
200 |
- //-- vstats generation |
201 |
-@@ -1128,3 +1100,148 @@ |
202 |
- set_format_params(avctx, selected_format); |
203 |
- return selected_format; |
204 |
- } |
205 |
-+ |
206 |
-+ |
207 |
-+/* |
208 |
-+ FFWrapper |
209 |
-+*/ |
210 |
-+static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame) |
211 |
-+{ |
212 |
-+ return avcodec_default_get_buffer2(avctx, frame, 0); |
213 |
-+} |
214 |
-+ |
215 |
-+static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic) |
216 |
-+{ |
217 |
-+ av_frame_unref(pic); |
218 |
-+} |
219 |
-+ |
220 |
-+typedef struct CompatReleaseBufPriv { |
221 |
-+ AVCodecContext avctx; |
222 |
-+ AVFrame frame; |
223 |
-+ uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame |
224 |
-+} CompatReleaseBufPriv; |
225 |
-+ |
226 |
-+static void compat_free_buffer(void *opaque, uint8_t *data) |
227 |
-+{ |
228 |
-+ CompatReleaseBufPriv *priv = opaque; |
229 |
-+ release_buffer(&priv->avctx, &priv->frame); |
230 |
-+ av_freep(&priv); |
231 |
-+} |
232 |
-+ |
233 |
-+static void compat_release_buffer(void *opaque, uint8_t *data) |
234 |
-+{ |
235 |
-+ AVBufferRef *buf = opaque; |
236 |
-+ av_buffer_unref(&buf); |
237 |
-+} |
238 |
-+ |
239 |
-+static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags) |
240 |
-+{ |
241 |
-+ /* |
242 |
-+ * Wrap an old get_buffer()-allocated buffer in a bunch of AVBuffers. |
243 |
-+ * We wrap each plane in its own AVBuffer. Each of those has a reference to |
244 |
-+ * a dummy AVBuffer as its private data, unreffing it on free. |
245 |
-+ * When all the planes are freed, the dummy buffer's free callback calls |
246 |
-+ * release_buffer(). |
247 |
-+ */ |
248 |
-+ CompatReleaseBufPriv *priv = NULL; |
249 |
-+ AVBufferRef *dummy_buf = NULL; |
250 |
-+ int planes, i, ret; |
251 |
-+ |
252 |
-+ ret = get_buffer(avctx, frame, flags & AV_GET_BUFFER_FLAG_REF); |
253 |
-+ if (ret < 0) |
254 |
-+ return ret; |
255 |
-+ |
256 |
-+ /* return if the buffers are already set up |
257 |
-+ * this would happen e.g. when a custom get_buffer() calls |
258 |
-+ * avcodec_default_get_buffer |
259 |
-+ */ |
260 |
-+ if (frame->buf[0]) |
261 |
-+ goto end0; |
262 |
-+ |
263 |
-+ priv = av_mallocz(sizeof(*priv)); |
264 |
-+ if (!priv) { |
265 |
-+ ret = AVERROR(ENOMEM); |
266 |
-+ goto fail; |
267 |
-+ } |
268 |
-+ priv->avctx = *avctx; |
269 |
-+ priv->frame = *frame; |
270 |
-+ |
271 |
-+ dummy_buf = av_buffer_create(NULL, 0, compat_free_buffer, priv, 0); |
272 |
-+ if (!dummy_buf) { |
273 |
-+ ret = AVERROR(ENOMEM); |
274 |
-+ goto fail; |
275 |
-+ } |
276 |
-+ |
277 |
-+#define WRAP_PLANE(ref_out, data, data_size) \ |
278 |
-+do { \ |
279 |
-+ AVBufferRef *dummy_ref = av_buffer_ref(dummy_buf); \ |
280 |
-+ if (!dummy_ref) { \ |
281 |
-+ ret = AVERROR(ENOMEM); \ |
282 |
-+ goto fail; \ |
283 |
-+ } \ |
284 |
-+ ref_out = av_buffer_create(data, data_size, compat_release_buffer, \ |
285 |
-+ dummy_ref, 0); \ |
286 |
-+ if (!ref_out) { \ |
287 |
-+ av_buffer_unref(&dummy_ref); \ |
288 |
-+ av_frame_unref(frame); \ |
289 |
-+ ret = AVERROR(ENOMEM); \ |
290 |
-+ goto fail; \ |
291 |
-+ } \ |
292 |
-+} while (0) |
293 |
-+ |
294 |
-+ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { |
295 |
-+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); |
296 |
-+ |
297 |
-+ planes = av_pix_fmt_count_planes(frame->format); |
298 |
-+ /* workaround for AVHWAccel plane count of 0, buf[0] is used as |
299 |
-+ check for allocated buffers: make libavcodec happy */ |
300 |
-+ if (desc && desc->flags & AV_PIX_FMT_FLAG_HWACCEL) |
301 |
-+ planes = 1; |
302 |
-+ if (!desc || planes <= 0) { |
303 |
-+ ret = AVERROR(EINVAL); |
304 |
-+ goto fail; |
305 |
-+ } |
306 |
-+ |
307 |
-+ for (i = 0; i < planes; i++) { |
308 |
-+ int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0; |
309 |
-+ int plane_size = (frame->height >> v_shift) * frame->linesize[i]; |
310 |
-+ |
311 |
-+ WRAP_PLANE(frame->buf[i], frame->data[i], plane_size); |
312 |
-+ } |
313 |
-+ } else { |
314 |
-+ int planar = av_sample_fmt_is_planar(frame->format); |
315 |
-+ planes = planar ? avctx->channels : 1; |
316 |
-+ |
317 |
-+ if (planes > FF_ARRAY_ELEMS(frame->buf)) { |
318 |
-+ frame->nb_extended_buf = planes - FF_ARRAY_ELEMS(frame->buf); |
319 |
-+ frame->extended_buf = av_malloc_array(sizeof(*frame->extended_buf), |
320 |
-+ frame->nb_extended_buf); |
321 |
-+ if (!frame->extended_buf) { |
322 |
-+ ret = AVERROR(ENOMEM); |
323 |
-+ goto fail; |
324 |
-+ } |
325 |
-+ } |
326 |
-+ |
327 |
-+ for (i = 0; i < FFMIN(planes, FF_ARRAY_ELEMS(frame->buf)); i++) |
328 |
-+ WRAP_PLANE(frame->buf[i], frame->extended_data[i], frame->linesize[0]); |
329 |
-+ |
330 |
-+ for (i = 0; i < frame->nb_extended_buf; i++) |
331 |
-+ WRAP_PLANE(frame->extended_buf[i], |
332 |
-+ frame->extended_data[i + FF_ARRAY_ELEMS(frame->buf)], |
333 |
-+ frame->linesize[0]); |
334 |
-+ } |
335 |
-+ |
336 |
-+ av_buffer_unref(&dummy_buf); |
337 |
-+ |
338 |
-+end0: |
339 |
-+ frame->width = avctx->width; |
340 |
-+ frame->height = avctx->height; |
341 |
-+ |
342 |
-+ return 0; |
343 |
-+ |
344 |
-+fail: |
345 |
-+ release_buffer(avctx, frame); |
346 |
-+ av_freep(&priv); |
347 |
-+ av_buffer_unref(&dummy_buf); |
348 |
-+ return ret; |
349 |
-+} |
350 |
|
351 |
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-chan.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-chan.patch |
352 |
deleted file mode 100644 |
353 |
index a448d084945..00000000000 |
354 |
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-chan.patch |
355 |
+++ /dev/null |
356 |
@@ -1,25 +0,0 @@ |
357 |
-r37447 | rtogni | 2015-08-14 21:30:34 +0200 (Fri, 14 Aug 2015) | 3 lines |
358 |
- |
359 |
-Replace deprecated avctx->request_channels with request_channel_layout |
360 |
- |
361 |
-Index: libmpcodecs/ad_ffmpeg.c |
362 |
-=================================================================== |
363 |
---- libmpcodecs/ad_ffmpeg.c (revision 37446) |
364 |
-+++ libmpcodecs/ad_ffmpeg.c (revision 37447) |
365 |
-@@ -46,6 +46,7 @@ |
366 |
- |
367 |
- #include "libavcodec/avcodec.h" |
368 |
- #include "libavutil/dict.h" |
369 |
-+#include "libavutil/channel_layout.h" |
370 |
- |
371 |
- struct adctx { |
372 |
- int last_samplerate; |
373 |
-@@ -127,7 +128,7 @@ |
374 |
- lavc_context->bits_per_coded_sample = sh_audio->wf->wBitsPerSample; |
375 |
- } |
376 |
- lavc_context->channel_layout = sh_audio->channel_layout; |
377 |
-- lavc_context->request_channels = audio_output_channels; |
378 |
-+ lavc_context->request_channel_layout = av_get_default_channel_layout(audio_output_channels); |
379 |
- lavc_context->codec_tag = sh_audio->format; //FOURCC |
380 |
- lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi |
381 |
- |
382 |
|
383 |
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-encode.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-encode.patch |
384 |
deleted file mode 100644 |
385 |
index 06a33f832f0..00000000000 |
386 |
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-encode.patch |
387 |
+++ /dev/null |
388 |
@@ -1,82 +0,0 @@ |
389 |
-r37453 | rtogni | 2015-08-23 22:32:50 +0200 (Sun, 23 Aug 2015) | 3 lines |
390 |
- |
391 |
-Replace deprecated av_encode_video() with av_encode_video2() |
392 |
- |
393 |
-Index: libmpcodecs/vf_uspp.c |
394 |
-=================================================================== |
395 |
---- libmpcodecs/vf_uspp.c (revision 37452) |
396 |
-+++ libmpcodecs/vf_uspp.c (revision 37453) |
397 |
-@@ -177,11 +177,16 @@ |
398 |
- const int x1= offset[i+count-1][0]; |
399 |
- const int y1= offset[i+count-1][1]; |
400 |
- int offset; |
401 |
-+ AVPacket pkt; |
402 |
-+ int ret, got_pkt; |
403 |
- p->frame->data[0]= p->src[0] + x1 + y1 * p->frame->linesize[0]; |
404 |
- p->frame->data[1]= p->src[1] + x1/2 + y1/2 * p->frame->linesize[1]; |
405 |
- p->frame->data[2]= p->src[2] + x1/2 + y1/2 * p->frame->linesize[2]; |
406 |
- |
407 |
-- avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame); |
408 |
-+ av_init_packet(&pkt); |
409 |
-+ pkt.data = p->outbuf; |
410 |
-+ pkt.size = p->outbuf_size; |
411 |
-+ avcodec_encode_video2(p->avctx_enc[i], &pkt, p->frame, &got_pkt); |
412 |
- p->frame_dec = p->avctx_enc[i]->coded_frame; |
413 |
- |
414 |
- offset= (BLOCK-x1) + (BLOCK-y1)*p->frame_dec->linesize[0]; |
415 |
-Index: libmpcodecs/vf_lavc.c |
416 |
-=================================================================== |
417 |
---- libmpcodecs/vf_lavc.c (revision 37452) |
418 |
-+++ libmpcodecs/vf_lavc.c (revision 37453) |
419 |
-@@ -86,6 +86,8 @@ |
420 |
- mp_image_t* dmpi; |
421 |
- int out_size; |
422 |
- AVFrame *pic= vf->priv->pic; |
423 |
-+ int ret, got_pkt; |
424 |
-+ AVPacket pkt; |
425 |
- |
426 |
- pic->data[0]=mpi->planes[0]; |
427 |
- pic->data[1]=mpi->planes[1]; |
428 |
-@@ -94,10 +96,14 @@ |
429 |
- pic->linesize[1]=mpi->stride[1]; |
430 |
- pic->linesize[2]=mpi->stride[2]; |
431 |
- |
432 |
-- out_size = avcodec_encode_video(&lavc_venc_context, |
433 |
-- vf->priv->outbuf, vf->priv->outbuf_size, pic); |
434 |
-+ av_init_packet(&pkt); |
435 |
-+ pkt.data = vf->priv->outbuf; |
436 |
-+ pkt.size = vf->priv->outbuf_size; |
437 |
-+ ret = avcodec_encode_video2(&lavc_venc_context, &pkt, pic, &got_pkt); |
438 |
- |
439 |
-- if(out_size<=0) return 1; |
440 |
-+ if(ret<=0) return 1; |
441 |
-+ if(!got_pkt) return 1; |
442 |
-+ out_size = pkt.size; |
443 |
- |
444 |
- dmpi=vf_get_image(vf->next,IMGFMT_MPEGPES, |
445 |
- MP_IMGTYPE_EXPORT, 0, |
446 |
-Index: libmpcodecs/vf_mcdeint.c |
447 |
-=================================================================== |
448 |
---- libmpcodecs/vf_mcdeint.c (revision 37452) |
449 |
-+++ libmpcodecs/vf_mcdeint.c (revision 37453) |
450 |
-@@ -92,6 +92,8 @@ |
451 |
- |
452 |
- static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int dst_stride[3], int src_stride[3], int width, int height){ |
453 |
- int x, y, i; |
454 |
-+ int got_pkt; |
455 |
-+ AVPacket pkt; |
456 |
- |
457 |
- for(i=0; i<3; i++){ |
458 |
- p->frame->data[i]= src[i]; |
459 |
-@@ -101,7 +103,10 @@ |
460 |
- p->avctx_enc->me_cmp= |
461 |
- p->avctx_enc->me_sub_cmp= FF_CMP_SAD /*| (p->parity ? FF_CMP_ODD : FF_CMP_EVEN)*/; |
462 |
- p->frame->quality= p->qp*FF_QP2LAMBDA; |
463 |
-- avcodec_encode_video(p->avctx_enc, p->outbuf, p->outbuf_size, p->frame); |
464 |
-+ av_init_packet(&pkt); |
465 |
-+ pkt.data = p->outbuf; |
466 |
-+ pkt.size = p->outbuf_size; |
467 |
-+ avcodec_encode_video2(p->avctx_enc, &pkt, p->frame, &got_pkt); |
468 |
- p->frame_dec = p->avctx_enc->coded_frame; |
469 |
- |
470 |
- for(i=0; i<3; i++){ |