diff options
author | Bobby Bingham <uhmmmm@gmail.com> | 2010-03-19 02:13:02 +0300 |
---|---|---|
committer | Bobby Bingham <uhmmmm@gmail.com> | 2010-03-19 02:13:02 +0300 |
commit | d313e17ab1180fcced3e61736e6e87f3d4f5101e (patch) | |
tree | 91cc5ac6f11fa26f138f7dc5a75db16e7527e40f /libavfilter/vf_slicify.c | |
parent | 91d1c741bfa5c39c222bb3f86357a9da50227df1 (diff) |
Use the new null callbacks to simplify filters and reduce duplicated code.
Originally committed as revision 22595 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_slicify.c')
-rw-r--r-- | libavfilter/vf_slicify.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/libavfilter/vf_slicify.c b/libavfilter/vf_slicify.c index e2ac594611..ec96db499d 100644 --- a/libavfilter/vf_slicify.c +++ b/libavfilter/vf_slicify.c @@ -57,12 +57,6 @@ static int config_props(AVFilterLink *link) 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) { SliceContext *slice = link->dst->priv; @@ -81,11 +75,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]); -} - static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { SliceContext *slice = link->dst->priv; @@ -116,11 +105,11 @@ AVFilter avfilter_vf_slicify = { .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, .draw_slice = draw_slice, .config_props = config_props, - .end_frame = end_frame, }, + .end_frame = avfilter_null_end_frame, }, { .name = NULL}}, .outputs = (AVFilterPad[]) {{ .name = "default", .type = CODEC_TYPE_VIDEO, }, |