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 CA4E249C59 for ; Thu, 4 Apr 2024 16:45:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 09D5968D0B7; Thu, 4 Apr 2024 19:45:37 +0300 (EEST) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2029C68CF96 for ; Thu, 4 Apr 2024 19:45:31 +0300 (EEST) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5684db9147dso1515948a12.2 for ; Thu, 04 Apr 2024 09:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712249130; x=1712853930; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=RihZVZgSgkqLRcw2OUrDWgbRa8s0Lg/ulZ5ct8bS4Lo=; b=JdQi2ZYuiZ/YgPFywm16j7dVcnMGn9RF2+O69o7OCVRUX3PALNFHgk2yiGWbibcdjH IW97Ku7njw/1TdH4TNUJAVe64+5Vo61sSqnOyD2uSFZUh1/GZO+L0+hu6eReQsbuGOC2 fkMNqMnhKUSx/4tSOQYQg6k/Yr95q5uDkpyoPHaU9adihyoF4OTgOzWg0RVIf9W/w1lv 6+qxBsknohf9cVFeW5bytN2fcLG6f8TLRV+1snp2ZQVlh9d2NjGRP+UTPpPydin7e5yf ip/1OZ13uhtbNjuJyyV0j+bYb2RTxgIYudtaYROY1PdfYZtaAFqPL+UaAl2fFZzvK+xI h6fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712249130; x=1712853930; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RihZVZgSgkqLRcw2OUrDWgbRa8s0Lg/ulZ5ct8bS4Lo=; b=sqFhY2Cd//KQaNkhEiuZpiK1d18RLAtHpCQC5PC7Otz6JGNVY3LHc6BjoemCjFheQ4 5Hx3HcRUKJP78DIOAjt468vkVn1xCJumJtopq1U6oL3N9QKfVcPIkghZ6uXjx7p/D+1u ruUrr1zLJypr9cQ6gUX8IIRT3JdvwXWl5dsiMeECVmMtt/NkDZ+Bds/4+fhEH9Kdt9XU C9PpJFAX9wa8ylX/OFWeXLZE4DL989TT0StBvZVpw+lLS0AbpVIpc/szob+TSotDxfEl fngOenSp6EX8Urwdr+BIp/cOP+SbtO0WpAGgU3jxVsOmJyrOYarDVMU+zeE+cdGkJAO0 b6/Q== X-Gm-Message-State: AOJu0YzMpPKEK0m70B0GrW/rvseDEcVso9737VNZ67GL6iprNLpNRo/b nScEKPZxlHWejAqxi0sfYLP3qWtP3sx0Zu7SRsISr52MuuqQONqYmWipgNLY X-Google-Smtp-Source: AGHT+IFWm9MNYoW2+8R6A1O+j/BvaWfbsdw/iBnNZJcf13q1+101Ogia+nG19ZR2aXlgxM/zWX5H4Q== X-Received: by 2002:a17:907:3f15:b0:a4e:802c:a7a2 with SMTP id hq21-20020a1709073f1500b00a4e802ca7a2mr2374961ejc.38.1712249129883; Thu, 04 Apr 2024 09:45:29 -0700 (PDT) Received: from mariano (host-79-42-51-175.retail.telecomitalia.it. [79.42.51.175]) by smtp.gmail.com with ESMTPSA id bl14-20020a170906c24e00b00a4e03c28fd5sm9244801ejb.43.2024.04.04.09.45.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 09:45:29 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 28314BFCE8; Thu, 4 Apr 2024 18:45:28 +0200 (CEST) Date: Thu, 4 Apr 2024 18:45:28 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: <20240404162936.4581-1-jamrial@gmail.com> <20240404162936.4581-2-jamrial@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240404162936.4581-2-jamrial@gmail.com> User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH 2/2] avcodec/liblc3enc: don't force unspec channel layouts 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On date Thursday 2024-04-04 13:29:36 -0300, James Almer wrote: > We only care about channel count. Layout details will be ignored either way. > > Signed-off-by: James Almer > --- > libavcodec/liblc3enc.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/liblc3enc.c b/libavcodec/liblc3enc.c > index 63d1645b10..5f8169a0cf 100644 > --- a/libavcodec/liblc3enc.c > +++ b/libavcodec/liblc3enc.c > @@ -61,6 +61,11 @@ static av_cold int liblc3_encode_init(AVCodecContext *avctx) > "Unsupported frame duration %.1f ms.\n", frame_us / 1000.f); > return AVERROR(EINVAL); > } > + if (channels < 0 || channels > ENCODER_MAX_CHANNELS) { > + av_log(avctx, AV_LOG_ERROR, > + "Unsupported channel count %d. Should be 1 or 2\n", channels); > + return AVERROR(EINVAL); > + } > > hr_mode |= srate_hz > 48000; > hr_mode &= srate_hz >= 48000; > @@ -195,9 +200,6 @@ const FFCodec ff_liblc3_encoder = { > .p.type = AVMEDIA_TYPE_AUDIO, > .p.id = AV_CODEC_ID_LC3, > .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, > - .p.ch_layouts = (const AVChannelLayout[]) > - { { AV_CHANNEL_ORDER_UNSPEC, 1 }, > - { AV_CHANNEL_ORDER_UNSPEC, 2 }, { 0 } }, shouldn't this be equivalent? Should be good anyway. _______________________________________________ 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".