From f6974fe651d29ef6eb68d66d73f7b6c011062aa0 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Tue, 28 Jul 2015 14:30:21 +0100 Subject: lavfi: Drop deprecated AVFilterBuffer* code Deprecated in 11/2012. --- libavfilter/video.c | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'libavfilter/video.c') diff --git a/libavfilter/video.c b/libavfilter/video.c index 9f1103e734..cadac50da8 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -54,53 +54,6 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) return frame; } -#if FF_API_AVFILTERBUFFER -AVFilterBufferRef * -avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int perms, - int w, int h, enum AVPixelFormat format) -{ - AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer)); - AVFilterBufferRef *picref = av_mallocz(sizeof(AVFilterBufferRef)); - - if (!pic || !picref) - goto fail; - - picref->buf = pic; - picref->buf->free = ff_avfilter_default_free_buffer; - if (!(picref->video = av_mallocz(sizeof(AVFilterBufferRefVideoProps)))) - goto fail; - - pic->w = picref->video->w = w; - pic->h = picref->video->h = h; - - /* make sure the buffer gets read permission or it's useless for output */ - picref->perms = perms | AV_PERM_READ; - - pic->refcount = 1; - picref->type = AVMEDIA_TYPE_VIDEO; - pic->format = picref->format = format; - - memcpy(pic->data, data, 4*sizeof(data[0])); - memcpy(pic->linesize, linesize, 4*sizeof(linesize[0])); - memcpy(picref->data, pic->data, sizeof(picref->data)); - memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize)); - - pic-> extended_data = pic->data; - picref->extended_data = picref->data; - - picref->pts = AV_NOPTS_VALUE; - - return picref; - -fail: - if (picref && picref->video) - av_free(picref->video); - av_free(picref); - av_free(pic); - return NULL; -} -#endif - AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h) { AVFrame *ret = NULL; -- cgit v1.2.3