mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avfilter/vf_drawbox: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
ab0834d51b
commit
505072e809
@ -183,8 +183,6 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
static const enum AVPixelFormat pix_fmts[] = {
|
||||||
AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
|
AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
|
||||||
AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
|
AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
|
||||||
@ -193,8 +191,6 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P,
|
AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P,
|
||||||
AV_PIX_FMT_NONE
|
AV_PIX_FMT_NONE
|
||||||
};
|
};
|
||||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int config_input(AVFilterLink *inlink)
|
static int config_input(AVFilterLink *inlink)
|
||||||
{
|
{
|
||||||
@ -405,7 +401,7 @@ const AVFilter ff_vf_drawbox = {
|
|||||||
.init = init,
|
.init = init,
|
||||||
FILTER_INPUTS(drawbox_inputs),
|
FILTER_INPUTS(drawbox_inputs),
|
||||||
FILTER_OUTPUTS(drawbox_outputs),
|
FILTER_OUTPUTS(drawbox_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||||
.process_command = process_command,
|
.process_command = process_command,
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
|
||||||
};
|
};
|
||||||
@ -487,7 +483,7 @@ const AVFilter ff_vf_drawgrid = {
|
|||||||
.init = init,
|
.init = init,
|
||||||
FILTER_INPUTS(drawgrid_inputs),
|
FILTER_INPUTS(drawgrid_inputs),
|
||||||
FILTER_OUTPUTS(drawgrid_outputs),
|
FILTER_OUTPUTS(drawgrid_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
|
||||||
.process_command = process_command,
|
.process_command = process_command,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user