From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C6776423FF for ; Tue, 15 Mar 2022 20:45:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AB84E68B13B; Tue, 15 Mar 2022 22:45:04 +0200 (EET) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5B25E68A81B for ; Tue, 15 Mar 2022 22:44:58 +0200 (EET) Received: by mail-oi1-f181.google.com with SMTP id q189so552092oia.9 for ; Tue, 15 Mar 2022 13:44:58 -0700 (PDT) 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=Ko6DEZN7JTYujJdnoC4YaI+LLrj9q+4xoQmx0EZu0Nw=; b=bWjgcDIoR43cSQFPHQgfHBtMPdtHNTKdedHHFxT88fApXN8Mrr8S2n3Tx1Q8r2S2uC At6R7LdMt6QhVMlMUgdGk8ptyilRbimLLFF4EJEfja4fqs4bGFaYB8iBPybxxfjIXL5b xfVXQUqUr1B4CkmO3KGU5UE773mPuhu4oh45g135gXpHj8z5AO/p2uLWdZd8rE2GCLQW Qcuav85HyKvPtoG0pViR+wVPWUO6zwGAiQki1xv827xialm9Cbj9Bn4XNgehQgnuYCQ8 tZeMVjrv1s1+jmx2UbxMVbbuSnMnwH3Ga1/PdUlm1rLa9iqYc5EuOnzUTgceegr6V35E EbWw== 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=Ko6DEZN7JTYujJdnoC4YaI+LLrj9q+4xoQmx0EZu0Nw=; b=cQRMmwa6TW021DkSOp9LE0Igol3OVC3ohiDRSkZP9UtRVKwtxmmEnZDOnopF/ST2Pd 7hXAVPMehgPNJmgRsSfX1yvPPSFAt5G6Wbah6NzOHwaGKKo1CzzhzyzJqILZqlsk9lWL APXcZjvKdSEjwF1P7H0T+ZjyvsUEBsBqleWR2157c3x6PxNghQeysv4Pf+v24emu0toL uxUFyPdue6v/5+7IvjdpBzmLpooMlm8DnPo+1dBa7nGUc9yZC9JRIf3dQ+Y64m1cxpEX HKAqGMUW6T05Z+Pi+ZtPX+tir9i3nk1cXQr3ex06TTawwE3YBbJ+8xxuRu/S436sVPE9 rbOQ== X-Gm-Message-State: AOAM531QTcBRnzTqsIWNwr/SCbBk34hdoOpN7CSx8ailYWkf8A33uGUA z1scG0N8+dWDuurIQrAf1FIyECjCjM9Jlw== X-Google-Smtp-Source: ABdhPJzhme0CuJEiKV+WTecEimdT7RB8oJpxMLEV8wwRqD46jT6FE4HqLkxHxu7bvG+RDrOPDekSlA== X-Received: by 2002:a05:6808:2083:b0:2da:146e:cb2b with SMTP id s3-20020a056808208300b002da146ecb2bmr2552235oiw.224.1647377096623; Tue, 15 Mar 2022 13:44:56 -0700 (PDT) Received: from [192.168.0.13] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id s2-20020a4ae482000000b0031c42eb457csm35989oov.43.2022.03.15.13.44.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Mar 2022 13:44:56 -0700 (PDT) Message-ID: <1382f5bd-673f-f429-0ce9-ce39c3f9b586@gmail.com> Date: Tue, 15 Mar 2022 17:44:55 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220315203013.14304-1-cus@passwd.hu> From: James Almer In-Reply-To: <20220315203013.14304-1-cus@passwd.hu> Subject: Re: [FFmpeg-devel] [PATCH 1/4] avutil/channel_layout: print channels using av_channel_name_bprint in av_channel_layout_describe_bprint 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 3/15/2022 5:30 PM, Marton Balint wrote: > This reduces code duplication an allows printing AMBI%d channel names for > custom layouts for non-standard or partial ambisonic layouts. > > Signed-off-by: Marton Balint > --- > libavutil/channel_layout.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c > index 8cc4efe4cf..c60ccf368f 100644 > --- a/libavutil/channel_layout.c > +++ b/libavutil/channel_layout.c > @@ -737,14 +737,10 @@ int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout, > av_bprintf(bp, "%d channels (", channel_layout->nb_channels); > for (i = 0; i < channel_layout->nb_channels; i++) { > enum AVChannel ch = av_channel_layout_channel_from_index(channel_layout, i); > - const char *channel = get_channel_name(ch); > > if (i) > av_bprintf(bp, "+"); > - if (channel) > - av_bprintf(bp, "%s", channel); > - else > - av_bprintf(bp, "USR%d", ch); > + av_channel_name_bprint(bp, ch); > if (channel_layout->order == AV_CHANNEL_ORDER_CUSTOM && > channel_layout->u.map[i].name[0]) > av_bprintf(bp, "@%s", channel_layout->u.map[i].name); Should be ok. _______________________________________________ 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".