X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_cropdetect.c;h=b245d6e12be2eb132ec0dfef03e529ec8a6e235a;hb=39a8275fdf4f607023b483a58b255600d5f7a9e7;hp=ed5d04eea8b1f05178bbaa6c6c87fedc093d0f53;hpb=94d5650266f3bd5a43088f4419a1d60f89d6249c;p=ffmpeg diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index ed5d04eea8b..b245d6e12be 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -26,6 +26,7 @@ #include "libavutil/imgutils.h" #include "avfilter.h" #include "formats.h" +#include "internal.h" #include "video.h" typedef struct { @@ -79,7 +80,7 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i return total; } -static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +static av_cold int init(AVFilterContext *ctx, const char *args) { CropDetectContext *cd = ctx->priv; @@ -91,7 +92,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) if (args) sscanf(args, "%d:%d:%d", &cd->limit, &cd->round, &cd->reset_count); - av_log(ctx, AV_LOG_INFO, "limit:%d round:%d reset_count:%d\n", + av_log(ctx, AV_LOG_VERBOSE, "limit:%d round:%d reset_count:%d\n", cd->limit, cd->round, cd->reset_count); return 0; @@ -113,7 +114,7 @@ static int config_input(AVFilterLink *inlink) return 0; } -static void end_frame(AVFilterLink *inlink) +static int end_frame(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; CropDetectContext *cd = ctx->priv; @@ -190,7 +191,7 @@ static void end_frame(AVFilterLink *inlink) w, h, x, y); } - ff_end_frame(inlink->dst->outputs[0]); + return ff_end_frame(inlink->dst->outputs[0]); } AVFilter avfilter_vf_cropdetect = { @@ -202,15 +203,15 @@ AVFilter avfilter_vf_cropdetect = { .query_formats = query_formats, - .inputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_input, - .get_video_buffer = ff_null_get_video_buffer, - .start_frame = ff_null_start_frame, - .end_frame = end_frame, }, - { .name = NULL}}, - - .outputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO }, - { .name = NULL}}, + .inputs = (const AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_input, + .get_video_buffer = ff_null_get_video_buffer, + .start_frame = ff_null_start_frame, + .end_frame = end_frame, }, + { .name = NULL}}, + + .outputs = (const AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO }, + { .name = NULL}}, };