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 6ACBA42F42 for ; Thu, 13 Jan 2022 02:42:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8E27168B8CF; Thu, 13 Jan 2022 04:05:58 +0200 (EET) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E50EF68B8BA for ; Thu, 13 Jan 2022 04:05:54 +0200 (EET) Received: by mail-qk1-f178.google.com with SMTP id t24so5555742qkg.11 for ; Wed, 12 Jan 2022 18:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=tpx9MYpjauTTJxy/T47pujg2BCKkaI2dmbox0ipsaLE=; b=R+hjSa7kJb6GZ6JMAmKPNAwR3lftexSt1a4rSPVd9TT+LxH1TjN0lhcJIn+cSIN/ib MxCIV74zBxojrFkjiSFAYobJbO5ORVZJd2HcwVrX1HzpOCXNqNRAEw7Qr7xcWHX89dZK zZgrngMKMTdLmPs0bebeajJCEszaYyBIPCYRYqSPdRo24uJzp+Elz4GJstSkImtuWWFy Iy5A/A+MMWAoQQp5N8DyKMHEHTX1jefB/ESbXI4jawLjPfr/GHm8+XVtro/yEnAjLnyE dmwk7sFndYjqJ1y+JDjaAGNnNnGMzQp5QfiwDnFWzK/AKBSwP+yca7iD5+VYYuyDBGJU 4eIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tpx9MYpjauTTJxy/T47pujg2BCKkaI2dmbox0ipsaLE=; b=iN+Cu0D80HniAogOzgLoYfEHpJkFZZjQDtpe+sM+VkhWquKl9nEKOTYaZsQDdDYmCP V6UMNO3ggNB1qR/bq8rvjO/eo9J71TY6NDmduiFzsu10OdCuKECYKEu088YsAxczF29g UwoWvD0Z6RaL/xuRq6kRTJGN0zp4IDEcKZa83ZYIvP3oRXFGOKO7eIqubrqDiqvtsEi6 ep/nmAVnaQjTv4CIH5GecZd31n7nkRcAG82L2l/wBhF7BnIqlfbA5cMj7dJoVxOLg+Z+ aBi1DNB2GrWpk6IjogbNvgrYBaNCSTHiGS3IW+7/gLGD7tM2SSbrvSCVM3xYTS7PDJcM i9oA== X-Gm-Message-State: AOAM532oTrgzH59DczbbtlGpGPjJVNu74rWDth30P1Y7C8f6VkVfbuCw hxUyfm/h46eY2kkmOoepcmR7YRiBuo4= X-Google-Smtp-Source: ABdhPJzfymfAmU7t+LNO5NfRKc7xMDYZKaIAA7nNJxBLZfFVKSkSIFM9nXR3izvQ5bJlKW2IK5lHIA== X-Received: by 2002:a37:688d:: with SMTP id d135mr597660qkc.346.1642039553478; Wed, 12 Jan 2022 18:05:53 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id k9sm1264556qko.29.2022.01.12.18.05.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:05:53 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:05:07 -0300 Message-Id: <20220113020518.730-19-jamrial@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113015101.4-1-jamrial@gmail.com> References: <20220113015101.4-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 228/281] libopencore-amr: 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 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: From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavcodec/libopencore-amr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c index 2df1c5090f..aa5f0e774e 100644 --- a/libavcodec/libopencore-amr.c +++ b/libavcodec/libopencore-amr.c @@ -38,13 +38,13 @@ static int amr_decode_fix_avctx(AVCodecContext *avctx) if (!avctx->sample_rate) avctx->sample_rate = 8000 * is_amr_wb; - if (avctx->channels > 1) { + if (avctx->ch_layout.nb_channels > 1) { avpriv_report_missing_feature(avctx, "multi-channel AMR"); return AVERROR_PATCHWELCOME; } - avctx->channels = 1; - avctx->channel_layout = AV_CH_LAYOUT_MONO; + av_channel_layout_uninit(&avctx->ch_layout); + avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; avctx->sample_fmt = AV_SAMPLE_FMT_S16; return 0; } @@ -201,7 +201,7 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx) return AVERROR(ENOSYS); } - if (avctx->channels != 1) { + if (avctx->ch_layout.nb_channels != 1) { av_log(avctx, AV_LOG_ERROR, "Only mono supported\n"); return AVERROR(ENOSYS); } -- 2.34.1 _______________________________________________ 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".