lavfi/bbox: switch to ff_filter_frame() API

This commit is contained in:
Stefano Sabatini
2012-12-02 18:13:49 +01:00
parent 255be0734d
commit 5148147b26

View File

@@ -56,11 +56,10 @@ static int query_formats(AVFilterContext *ctx)
return 0; return 0;
} }
static int end_frame(AVFilterLink *inlink) static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
{ {
AVFilterContext *ctx = inlink->dst; AVFilterContext *ctx = inlink->dst;
BBoxContext *bbox = ctx->priv; BBoxContext *bbox = ctx->priv;
AVFilterBufferRef *picref = inlink->cur_buf;
FFBoundingBox box; FFBoundingBox box;
int has_bbox, w, h; int has_bbox, w, h;
@@ -86,7 +85,7 @@ static int end_frame(AVFilterLink *inlink)
av_log(ctx, AV_LOG_INFO, "\n"); av_log(ctx, AV_LOG_INFO, "\n");
bbox->frame++; bbox->frame++;
return ff_end_frame(inlink->dst->outputs[0]); return ff_filter_frame(inlink->dst->outputs[0], picref);
} }
static const AVFilterPad bbox_inputs[] = { static const AVFilterPad bbox_inputs[] = {
@@ -94,8 +93,7 @@ static const AVFilterPad bbox_inputs[] = {
.name = "default", .name = "default",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer, .get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame, .filter_frame = filter_frame,
.end_frame = end_frame,
.min_perms = AV_PERM_READ, .min_perms = AV_PERM_READ,
}, },
{ NULL } { NULL }