From patchwork Mon Apr 19 14:09:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27038 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp561263iob; Mon, 19 Apr 2021 07:18:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWDuSCOu+1/H6FX0oged4i31oRQOnN5ingXCqzjwRotGKjgmWjZ5xPTquONFYCscxql7L/ X-Received: by 2002:a5d:5444:: with SMTP id w4mr14516226wrv.202.1618841892022; Mon, 19 Apr 2021 07:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841892; cv=none; d=google.com; s=arc-20160816; b=fIDIsdsK7YauaLYrPaM8ULQrEPjIYhICSLJJrPBKDZRc3Eox77Wn/l9yl+Jkxet4my YdVB2r35ocbWwECHiKXcAXT0x1khmsgS3fF825f30b3nTq5G+X6tZD36+pusw6GBXZeq ZOrg/dK+LEUqgUiNtw6qgQ/TArblN72AIyd6ETcFaRdD+cZovG7tFkaklmnwQZIvfgLe vofzX/+zdHvqJhanKjAmqe5OMoL0wY8/RTk9vQiSx2D+5JIsGTZ59jfzsEvhDneHwMUv V6oR5rXlsDymKphTEdTmcwj6xrsFzvnMcnlfU4NSYhxAzNfRzAsRCOT77/iDRP51tj5q MXCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=mkn494zROKqVocrihqm4uf8vtcZRaPvL2yYOG+Y1GD4=; b=1CBg8e4rv7c0XQvY7jDC89+KY+vaaOf5p/1m2dFYdjWmyJl/WHRccUP8dhnhqu2uym MDV/F/dmqgfKIZnRiek6pypBPXXtinG2HdhwF53MyitqRPguVpzlu/whJwocwBM7Ynhl Pvuc3RvCHLP4xXjj/i2HP2GpNIOS+yC4U7QI9e/ZFEyJVtQhLgpABHGIPdgSUY2YMInq tCorYCQEc1pw8dgDFYhLgwQaYG3vPm87ltgJThmClLQmWGQk9sirVKAQgg+5wIC2J4m7 liUINtAf/yi+TCzX0lpEA2bVuEt7zlqSiHvQUlK5akQug59+cD1ewmFcG/vTU+ptcz5A vXOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Q0If1GEQ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a3si13441312ejd.575.2021.04.19.07.18.11; Mon, 19 Apr 2021 07:18:12 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Q0If1GEQ; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 01761680867; Mon, 19 Apr 2021 17:12:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4717C689901 for ; Mon, 19 Apr 2021 17:12:03 +0300 (EEST) Received: by mail-qk1-f174.google.com with SMTP id e13so26003399qkl.6 for ; Mon, 19 Apr 2021 07:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4EsC+z21S9fSl1kTqpDckEaXLBeDzvebipiQCrc+9kA=; b=Q0If1GEQxjtRBmcxCXhltvsYlTCMChp3sRutFzFyuWtMEewTFZNUVO3yVuhwV/5GKg Ok5jlvplakeP058XpA2zdu2pq3PS3RYYwFVzhls6mR6jmUR91xtRRHZo/1jgMZVL568N U+2j7AEAdf3nukTECDsLMt1JxGepvs7/o/ICJUH2NH45DG4s2CL0elRvq5qFaJowmpSA ItHXBxSfTPgtXfyL1eXLb3hySTfqsftGG0ottAcG1tdu+pZVGcn7iKbwVbQXiulyNGGc X5GdfhiENAR1VnHxHsuXjzGgVSZ0JfeSbka2k5iTOYuYWcqR5lhFZwdDJi663/AujFU0 HhQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4EsC+z21S9fSl1kTqpDckEaXLBeDzvebipiQCrc+9kA=; b=UhjdfyaLJXwuJduMHzfi7gAgB6KsFY6b8i2RM9MJx+KHNj/KXKxTtKABFE0P0h7buh cJPe9L1Sxma1y9E82qbGqxagzZozBw11Ddx8JHHlrp4SDbUc7Nt/v37pcpS5uPm9CDNV AfLWL9Tcrlkh5BJ9iSWzTcSNdKbx9qucVh1oQ1x5kqhitlQjPcII0rBuU2la9ox8dv/H DarWCK+9/QeT3v7+lVIKPbjFK7vZTk+vQGQ3oIrVds8iKM8jyJHYfjhXD+cUP2YxSaa+ 7lwpyQfIIsgRrQ8nb3kZWJbweXXOoCB5KVLsbKgEDK8uAnpbqVuvCPNDxGUJj0V8SmEg jmGw== X-Gm-Message-State: AOAM5316fYb4dMp1RS/ZVHeo5zP8tqbOi3hqkgkd7UKkWBVyiZkcxseR 3NMtLVNISaiK3+Fo/7njlK5KswMG0nA= X-Received: by 2002:a37:6801:: with SMTP id d1mr3086706qkc.363.1618841521925; Mon, 19 Apr 2021 07:12:01 -0700 (PDT) Received: from localhost.localdomain ([191.83.209.133]) by smtp.gmail.com with ESMTPSA id f7sm2049494qtv.53.2021.04.19.07.12.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:12:01 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 11:09:47 -0300 Message-Id: <20210419141024.8174-51-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419141024.8174-1-jamrial@gmail.com> References: <20210419141024.8174-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 50/87] avfilter/avfilter: Remove compatibility code for old filter options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4d1+I0w/+mBO From: Andreas Rheinhardt Added in ad7d972e08dddb1788ac6a434d1be314febcb09d; the old syntax has been deprecated in b439c992c23f3e0f3832fffd2a34a664b236c525. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 82 ++---------------------------------------- libavfilter/version.h | 3 -- 2 files changed, 3 insertions(+), 82 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 22ecad5f77..b3ad8d57b3 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -948,85 +948,9 @@ int avfilter_init_str(AVFilterContext *filter, const char *args) return AVERROR(EINVAL); } -#if FF_API_OLD_FILTER_OPTS_ERROR - if ( !strcmp(filter->filter->name, "format") || - !strcmp(filter->filter->name, "noformat") || - !strcmp(filter->filter->name, "frei0r") || - !strcmp(filter->filter->name, "frei0r_src") || - !strcmp(filter->filter->name, "ocv") || - !strcmp(filter->filter->name, "pan") || - !strcmp(filter->filter->name, "pp") || - !strcmp(filter->filter->name, "aevalsrc")) { - /* a hack for compatibility with the old syntax - * replace colons with |s */ - char *copy = av_strdup(args); - char *p = copy; - int nb_leading = 0; // number of leading colons to skip - int deprecated = 0; - - if (!copy) { - ret = AVERROR(ENOMEM); - goto fail; - } - - if (!strcmp(filter->filter->name, "frei0r") || - !strcmp(filter->filter->name, "ocv")) - nb_leading = 1; - else if (!strcmp(filter->filter->name, "frei0r_src")) - nb_leading = 3; - - while (nb_leading--) { - p = strchr(p, ':'); - if (!p) { - p = copy + strlen(copy); - break; - } - p++; - } - - deprecated = strchr(p, ':') != NULL; - - if (!strcmp(filter->filter->name, "aevalsrc")) { - deprecated = 0; - while ((p = strchr(p, ':')) && p[1] != ':') { - const char *epos = strchr(p + 1, '='); - const char *spos = strchr(p + 1, ':'); - const int next_token_is_opt = epos && (!spos || epos < spos); - if (next_token_is_opt) { - p++; - break; - } - /* next token does not contain a '=', assume a channel expression */ - deprecated = 1; - *p++ = '|'; - } - if (p && *p == ':') { // double sep '::' found - deprecated = 1; - memmove(p, p + 1, strlen(p)); - } - } else - while ((p = strchr(p, ':'))) - *p++ = '|'; - - if (deprecated) { - av_log(filter, AV_LOG_ERROR, "This syntax is deprecated. Use " - "'|' to separate the list items ('%s' instead of '%s')\n", - copy, args); - ret = AVERROR(EINVAL); - } else { - ret = process_options(filter, &options, copy); - } - av_freep(©); - - if (ret < 0) - goto fail; - } else -#endif - { - ret = process_options(filter, &options, args); - if (ret < 0) - goto fail; - } + ret = process_options(filter, &options, args); + if (ret < 0) + goto fail; } ret = avfilter_init_dict(filter, &options); diff --git a/libavfilter/version.h b/libavfilter/version.h index 18e1a95c72..fd38252411 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -50,9 +50,6 @@ * the public API and may change, break or disappear at any time. */ -#ifndef FF_API_OLD_FILTER_OPTS_ERROR -#define FF_API_OLD_FILTER_OPTS_ERROR (LIBAVFILTER_VERSION_MAJOR < 8) -#endif #ifndef FF_API_LAVR_OPTS #define FF_API_LAVR_OPTS (LIBAVFILTER_VERSION_MAJOR < 8) #endif