From d313e17ab1180fcced3e61736e6e87f3d4f5101e Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Thu, 18 Mar 2010 23:13:02 +0000 Subject: Use the new null callbacks to simplify filters and reduce duplicated code. Originally committed as revision 22595 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavfilter/vf_aspect.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'libavfilter/vf_aspect.c') diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index f1961ce217..801f927ba3 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -56,13 +56,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) return 0; } - -static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms, - int w, int h) -{ - return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); -} - static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) { AspectContext *aspect = link->dst->priv; @@ -71,11 +64,6 @@ static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) avfilter_start_frame(link->dst->outputs[0], picref); } -static void end_frame(AVFilterLink *link) -{ - avfilter_end_frame(link->dst->outputs[0]); -} - #if CONFIG_ASPECT_FILTER /* for aspect filter, convert from frame aspect ratio to pixel aspect ratio */ static int frameaspect_config_props(AVFilterLink *inlink) @@ -100,9 +88,9 @@ AVFilter avfilter_vf_aspect = { .inputs = (AVFilterPad[]) {{ .name = "default", .type = CODEC_TYPE_VIDEO, .config_props = frameaspect_config_props, - .get_video_buffer = get_video_buffer, + .get_video_buffer = avfilter_null_get_video_buffer, .start_frame = start_frame, - .end_frame = end_frame }, + .end_frame = avfilter_null_end_frame }, { .name = NULL}}, .outputs = (AVFilterPad[]) {{ .name = "default", @@ -122,9 +110,9 @@ AVFilter avfilter_vf_pixelaspect = { .inputs = (AVFilterPad[]) {{ .name = "default", .type = CODEC_TYPE_VIDEO, - .get_video_buffer = get_video_buffer, + .get_video_buffer = avfilter_null_get_video_buffer, .start_frame = start_frame, - .end_frame = end_frame }, + .end_frame = avfilter_null_end_frame }, { .name = NULL}}, .outputs = (AVFilterPad[]) {{ .name = "default", -- cgit v1.2.3