mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-24 15:57:00 +00:00
avfilter/vf_cropdetect: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
d60c3303ac
commit
05df3f3f92
@ -44,8 +44,6 @@ typedef struct CropDetectContext {
|
||||
int max_outliers;
|
||||
} CropDetectContext;
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
static const enum AVPixelFormat pix_fmts[] = {
|
||||
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P,
|
||||
AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVJ422P,
|
||||
@ -63,9 +61,6 @@ static int query_formats(AVFilterContext *ctx)
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
||||
}
|
||||
|
||||
static int checkline(void *ctx, const unsigned char *src, int stride, int len, int bpp)
|
||||
{
|
||||
int total = 0;
|
||||
@ -277,6 +272,6 @@ const AVFilter ff_vf_cropdetect = {
|
||||
.init = init,
|
||||
FILTER_INPUTS(avfilter_vf_cropdetect_inputs),
|
||||
FILTER_OUTPUTS(avfilter_vf_cropdetect_outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user