avfilter/vf_libopencv: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/369/head
Andreas Rheinhardt 3 years ago
parent 55e8c3598b
commit 7b0c500b4c
  1. 10
      libavfilter/vf_libopencv.c

@ -64,14 +64,6 @@ static void fill_frame_from_iplimage(AVFrame *frame, const IplImage *img, enum A
frame->data[0] = img->imageData;
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
typedef struct OCVContext {
const AVClass *class;
char *name;
@ -431,5 +423,5 @@ const AVFilter ff_vf_ocv = {
.uninit = uninit,
FILTER_INPUTS(avfilter_vf_ocv_inputs),
FILTER_OUTPUTS(avfilter_vf_ocv_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS(AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8),
};

Loading…
Cancel
Save