X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvideo.c;h=0274fc18f7a9d193196d4f1108ecd969cda14c29;hb=ba42096d9acb73cc9b74685bf822a3180d96bab5;hp=6a554834b3917a8e2a1a51c7f9c759809b45b594;hpb=10ea06b3bb863b8dca51f65c4b725eeba8557f12;p=ffmpeg diff --git a/libavfilter/video.c b/libavfilter/video.c index 6a554834b39..0274fc18f7a 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -59,53 +59,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 * const data[4], const 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;