X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_bbox.c;h=698456d7b19e39b07d967597a5e93a8e03a57d95;hb=83ab46a57e4b8c647366bf81679891164e215a00;hp=07ac5505bb17b8325cc994238042fc8cd9041300;hpb=1b5a6d3c4966fb67d79445aca9c1ad6c1ecbdd4b;p=ffmpeg diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c index 07ac5505bb1..698456d7b19 100644 --- a/libavfilter/vf_bbox.c +++ b/libavfilter/vf_bbox.c @@ -89,26 +89,32 @@ static int end_frame(AVFilterLink *inlink) return ff_end_frame(inlink->dst->outputs[0]); } +static const AVFilterPad bbox_inputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .get_video_buffer = ff_null_get_video_buffer, + .start_frame = ff_null_start_frame, + .end_frame = end_frame, + .min_perms = AV_PERM_READ, + }, + { NULL } +}; + +static const AVFilterPad bbox_outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + }, + { NULL } +}; + AVFilter avfilter_vf_bbox = { .name = "bbox", .description = NULL_IF_CONFIG_SMALL("Compute bounding box for each frame."), .priv_size = sizeof(BBoxContext), .query_formats = query_formats, .init = init, - - .inputs = (const AVFilterPad[]) { - { .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .get_video_buffer = ff_null_get_video_buffer, - .start_frame = ff_null_start_frame, - .end_frame = end_frame, - .min_perms = AV_PERM_READ, }, - { .name = NULL } - }, - - .outputs = (const AVFilterPad[]) { - { .name = "default", - .type = AVMEDIA_TYPE_VIDEO }, - { .name = NULL } - }, + .inputs = bbox_inputs, + .outputs = bbox_outputs, };