1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_ocr: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 21:18:23 +02:00
parent 2232a9ffbf
commit bdfdb255f1

View File

@ -73,8 +73,6 @@ static av_cold int init(AVFilterContext *ctx)
return 0;
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_GRAY8,
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
@ -87,9 +85,6 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{
AVDictionary **metadata = &in->metadata;
@ -150,5 +145,5 @@ const AVFilter ff_vf_ocr = {
.uninit = uninit,
FILTER_INPUTS(ocr_inputs),
FILTER_OUTPUTS(ocr_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS_ARRAY(pix_fmts),
};