From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id E349D411C1 for <ffmpegdev@gitmailbox.com>; Tue, 15 Feb 2022 12:27:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D21468B17A; Tue, 15 Feb 2022 14:27:48 +0200 (EET) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 47D2268AF3A for <ffmpeg-devel@ffmpeg.org>; Tue, 15 Feb 2022 14:27:42 +0200 (EET) Received: by mail-ot1-f42.google.com with SMTP id v6-20020a05683024a600b005ac1754342fso10003583ots.5 for <ffmpeg-devel@ffmpeg.org>; Tue, 15 Feb 2022 04:27:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=UBJt9k42tVPtJAOluFsGW6NTQqwi98+/m/PsHFHPeuw=; b=h2Dma6dXQlfH0ZpDADrWXtKZg8cD3OwiR6VKlRlccpUSpO1IjFgnNI1zV+3UBOoDph NKoogfgHk1yZvRf5+zjC05dbajM1iliaWhLb4uySBqXkkZZGmVcbhwpkzvsZXEB9+om5 PItU/qgk5jTdFex3NH4BKNoCFefuHPgNf6I5zQLHFOLRS7NMIobYivJZh4NzwgbEC/kB XEjtGjIyCI/Ixl/X8r5OuUKLseOtn7hGAwV9ATfnGg+g1TQESS7GjnenXcz9KYZw94vw eMhCumNXUYYajd8QsaLVfJbMaJ44K67d6EmG0msDquEsErvPmNsIjtDa9d5f/kw2sMwa m9Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=UBJt9k42tVPtJAOluFsGW6NTQqwi98+/m/PsHFHPeuw=; b=fzY9Xncd6SElUqiK7wk+QkeMagpQQ07EBq1QzIfJfinfclb036C2zcbaUj9I+YtZ7V /wAktJwuRGcZHKUmzOIYT4T7b1F0bhJRX4k53ILPgpcOJwdG8k55l/3iFvks/hv+oSoK beSRWLYsMgZASDeitvNHSOidMPzCyUGxc5oxE9G2NI4eDql5hxYQ3iUu062QeWv/8xak r1+iwMvKVwfEuP1P7uzq2sJSnsOaQj0rCtoktH4jk+FNY31yNbiSgwYZzmCxiPQauYF4 nVwB6nLn72XN4B94MjAz3KwnuWUF0BdJFi+bEf3Wg922tEDKwf5SSKuZoUptgBDPYFcF BvJw== X-Gm-Message-State: AOAM530OYFUWgoiV2Q/klIQjsfNFqRuwhXPyv5eD5+F+ZbYTOyo1Nq2b Rrtg4B7BAlmq81lB233IlpXWPrgLZvxUrA== X-Google-Smtp-Source: ABdhPJwQcRU6S0MaNw8H6XuLIgB2GkRp8PCNo6oiDJJ8e8a2a1q/8aKn+Cgat4YM3VUgSuEEQb7nFA== X-Received: by 2002:a9d:6c48:: with SMTP id g8mr1208596otq.339.1644928059891; Tue, 15 Feb 2022 04:27:39 -0800 (PST) Received: from [192.168.0.10] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id k6sm13670617oop.28.2022.02.15.04.27.38 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Feb 2022 04:27:39 -0800 (PST) Message-ID: <832026c0-e14b-e09d-02e2-d5cd2d24c560@gmail.com> Date: Tue, 15 Feb 2022 09:27:37 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220113015101.4-1-jamrial@gmail.com> <20220113020913.870-6-jamrial@gmail.com> <164492580482.19727.5709579514076305797@lain.red.khirnov.net> From: James Almer <jamrial@gmail.com> In-Reply-To: <164492580482.19727.5709579514076305797@lain.red.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 275/281] avfilter: convert to new channel layout API X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/832026c0-e14b-e09d-02e2-d5cd2d24c560@gmail.com/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On 2/15/2022 8:50 AM, Anton Khirnov wrote: > Quoting James Almer (2022-01-13 03:09:07) >> @@ -212,31 +212,31 @@ static int config_input(AVFilterLink *inlink) >> return AVERROR(ENOMEM); >> for (ch = 0; ch < s->nb_in_channels; ch++) >> s->input_levels[ch] = s->level_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_FRONT_CENTER); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_FRONT_CENTER); >> if (ch >= 0) >> s->input_levels[ch] *= s->fc_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_FRONT_LEFT); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_FRONT_LEFT); >> if (ch >= 0) >> s->input_levels[ch] *= s->fl_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_FRONT_RIGHT); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_FRONT_RIGHT); >> if (ch >= 0) >> s->input_levels[ch] *= s->fr_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_SIDE_LEFT); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_SIDE_LEFT); >> if (ch >= 0) >> s->input_levels[ch] *= s->sl_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_SIDE_RIGHT); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_SIDE_RIGHT); >> if (ch >= 0) >> s->input_levels[ch] *= s->sr_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_BACK_LEFT); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_BACK_LEFT); >> if (ch >= 0) >> s->input_levels[ch] *= s->bl_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_BACK_RIGHT); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_BACK_RIGHT); >> if (ch >= 0) >> s->input_levels[ch] *= s->br_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_BACK_CENTER); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_BACK_CENTER); >> if (ch >= 0) >> s->input_levels[ch] *= s->bc_in; >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_LOW_FREQUENCY); >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_LOW_FREQUENCY); >> if (ch >= 0) > > Make all those compare to AV_CHAN_NONE ch is an index, so either >= 0, or EINVAL. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".