mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avfilter/vf_limiter: drop unneeded init()
This is redundant with the check in config_input(), and in particular, rejects an arguably valid configuration that applies an invalid limit to zero selected planes. Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
1 parent
40a836bbb8
commit
5d4c1bf1b5
1 file changed
-10
@@ -62,15 +62,6 @@ static const AVOption limiter_options[] = {
|
||||
|
||||
AVFILTER_DEFINE_CLASS(limiter);
|
||||
|
||||
static av_cold int init(AVFilterContext *ctx)
|
||||
{
|
||||
LimiterContext *s = ctx->priv;
|
||||
|
||||
if (s->min >= 0 && s->max >= 0 && s->min > s->max)
|
||||
return AVERROR(EINVAL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const enum AVPixelFormat pix_fmts[] = {
|
||||
AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P,
|
||||
AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P,
|
||||
@@ -283,7 +274,6 @@ const FFFilter ff_vf_limiter = {
|
||||
.p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC |
|
||||
AVFILTER_FLAG_SLICE_THREADS,
|
||||
.priv_size = sizeof(LimiterContext),
|
||||
.init = init,
|
||||
FILTER_INPUTS(inputs),
|
||||
FILTER_OUTPUTS(ff_video_default_filterpad),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
|
||||
Reference in new issue
Block a user