From patchwork Sat Jan 6 21:06:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 7173 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.78.2 with SMTP id r2csp916632jaa; Sat, 6 Jan 2018 13:06:46 -0800 (PST) X-Google-Smtp-Source: ACJfBosvo1xL577zOUPhDwUNBCXniRrEaGO86PuF5EkDvKwdktFhFpaxpUExwtfk5PaiFxWmMpj+ X-Received: by 10.28.198.78 with SMTP id w75mr4991742wmf.157.1515272806459; Sat, 06 Jan 2018 13:06:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515272806; cv=none; d=google.com; s=arc-20160816; b=Oc6DFBH7KGoh2SnhJSqxjBM0rBSpc/P1hCJS/mQRhjb4ef5gymHuBnAzzvtmqy/+09 8MxZrSRitdL0RPqknagNt4jKaku8VVlo8srLMavbMYbLUxxcoB8nAyiyyEIt+iLML2q5 vtK88PzMRR6s51fRU2DP6viy2fiHWJ/xYcxJ263MORxn+NeuvlixIsMDNSc0A+NJnNC8 L+YtJwP4kkHRPW2IoU4kWE+0dBtO/ovTzNHtcGZeR+PpirW1gNDV9Q3wNxC1TjS+X/YH RMURIH2IQGyzjhWof0AWrh+dF4PhN461JyY7oXlSnU9/044Ze6PXLiB/ejJdBOXcAKWs NbLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=Gen7E4szcsRv1RoaT5PjQVkohr5JtJyMekAJHNNQxv0=; b=c7Jxa2EHTLtvonIe5P0GXMsfpIqtLYfu33RDMrNcP0wmV44sShqseN+sGuL4rLid9t XHHaNSO4noGOr38r+r6ULWPGevG+mbAQVw75FWaxhG9bYCiiQn5tktEiyY64n4yQVY60 cyJ/Xw+Q3v1IhBD0aIs7byKkTZPGba1PNKcRImgt8Oc7Chbw83wiZpAL8joY/pyXbKqp bGCCQJDFRRajkB3HC3jTV2Dnl/eWjlHkJOEuOsYmpWudbG0EnEf1KhPlHJf3LOxPrjz5 NtL9ux1vqw3C5BjvrbRvIZ904vqcjtn6yqXwh8dxSjWSvNHlLlcNECa35hO3K9WsWCtL mQ4A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m74si5577322wmc.153.2018.01.06.13.06.45; Sat, 06 Jan 2018 13:06:46 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3E650689E77; Sat, 6 Jan 2018 23:06:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1EB0F689E43 for ; Sat, 6 Jan 2018 23:06:38 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 40D83E15F9; Sat, 6 Jan 2018 22:06:38 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7MCTXt77R_KW; Sat, 6 Jan 2018 22:06:37 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 4D948E1004; Sat, 6 Jan 2018 22:06:37 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sat, 6 Jan 2018 22:06:35 +0100 Message-Id: <20180106210635.17369-1-cus@passwd.hu> X-Mailer: git-send-email 2.13.6 Subject: [FFmpeg-devel] [PATCH] avfilter/formats: remove support for deprecated channel count specification X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Cc: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- libavfilter/formats.c | 12 ++---------- tests/ref/fate/filter-formats | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 20a2c89719..31ee445c49 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -662,20 +662,12 @@ int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx) int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg, void *log_ctx) { - char *tail; int64_t chlayout; int nb_channels; if (av_get_extended_channel_layout(arg, &chlayout, &nb_channels) < 0) { - /* [TEMPORARY 2016-12 -> 2017-12]*/ - nb_channels = strtol(arg, &tail, 10); - if (!errno && *tail == 'c' && *(tail + 1) == '\0' && nb_channels > 0 && nb_channels < 64) { - chlayout = 0; - av_log(log_ctx, AV_LOG_WARNING, "Deprecated channel count specification '%s'. This will stop working in releases made in 2018 and after.\n", arg); - } else { - av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg); - return AVERROR(EINVAL); - } + av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg); + return AVERROR(EINVAL); } if (!chlayout && !nret) { av_log(log_ctx, AV_LOG_ERROR, "Unknown channel layout '%s' is not supported.\n", arg); diff --git a/tests/ref/fate/filter-formats b/tests/ref/fate/filter-formats index ea85eed23d..17ff5b222f 100644 --- a/tests/ref/fate/filter-formats +++ b/tests/ref/fate/filter-formats @@ -75,7 +75,7 @@ quad(side) 0 = ff_parse_channel_layout(0000000000000004, 1, 1c); 0 = ff_parse_channel_layout(0000000000000003, 2, 2c); -1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, -1c); -0 = ff_parse_channel_layout(0000000000000000, 60, 60c); +-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 60c); -1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 65c); 0 = ff_parse_channel_layout(0000000000000000, 2, 2C); 0 = ff_parse_channel_layout(0000000000000000, 60, 60C);