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 C949D42F5D for ; Thu, 13 Jan 2022 02:47:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4114168B9B6; Thu, 13 Jan 2022 04:07:44 +0200 (EET) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4993768B962 for ; Thu, 13 Jan 2022 04:07:42 +0200 (EET) Received: by mail-qk1-f174.google.com with SMTP id h16so5626450qkp.3 for ; Wed, 12 Jan 2022 18:07:42 -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=3yhdH0ukmu7s/Io6AH9+wi/piYcl9TQK0PiDbxPK+m4=; b=dvhig7iolmep+K2jp4uKWHITGVt8Fr9nrAfTo4INBG72L605CIz3wenH4I6elZnnWZ cPTTNAopqkT9MN50HuNh456ia+YAcevR1CYg4tamAOCuF3UjoRf2YN+3EERbJXS8V7LN PMJlzLDZt3S4HvaWReSuoj8pzkCyVxfezb9/O4hVB4UDa0s3VLvclajC9hHfR9WQ1xjF E/H8WKzzIlDg+Tb3sMT6Iwrwbew7c6GfVR6ZrSNxwOA2TWaPrpUr9BSSwiiwvnfqle58 zlXqETduru0jJamnuFYKlrgWN+SzyD/ubv6a0yz9inEYpbkZZAgkS62WVFH5iA7Zgcgz Ag6g== 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=3yhdH0ukmu7s/Io6AH9+wi/piYcl9TQK0PiDbxPK+m4=; b=CnUe5mY16TGgajifLRp4/uspMYqJptiUuwZxyY6qvy+maD2fSHd9Z4ui0cRGEqqvWs rwTAWGHiSt4aqbHqEoKpQhaYVvrgKLX2cp0eJiWr6j5JEs+Mu0w7ADDlHwwrKi8TY5vD vpCOgppd0N345Nhv0DZEyDiWNGTTIJVLfQxDMsvVdSzhleyYEEMbde/0ugkUy8a5jGcr q1qg7OojE7vYkrC5miE7miMy8m4byB31baxLNFTbk4cceRD2+r/JNMHED06ExYLkfZWn wcJwyih8TZCOW6buX3PDqhtJiGSgB+dDaGwokKt8DAWzZXYwADN6ATrQpUzBdSf0cYot Z00g== X-Gm-Message-State: AOAM532LArHcStqtG7c7lP9TwD/YlyRlI+upuFPAe2AO2Eknj/Eto7qt cuzU9fUiUeoUz07LHw2RR/bb/cARS/0= X-Google-Smtp-Source: ABdhPJy4kuoG5QoFr/umr5zOj5HKSdsiPVAcIpVqzo3QuacN6Cwi5BuTVA43TCZukf3wyRG4dQBxDg== X-Received: by 2002:a05:620a:25c8:: with SMTP id y8mr1906987qko.455.1642039660839; Wed, 12 Jan 2022 18:07:40 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id a16sm1085946qta.13.2022.01.12.18.07.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:07:39 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:06:54 -0300 Message-Id: <20220113020713.801-11-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 250/281] ra144: 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: Anton Khirnov Signed-off-by: James Almer --- libavcodec/ra144dec.c | 4 ++-- libavcodec/ra144enc.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c index b6272b343b..86d0d6e889 100644 --- a/libavcodec/ra144dec.c +++ b/libavcodec/ra144dec.c @@ -39,8 +39,8 @@ static av_cold int ra144_decode_init(AVCodecContext * avctx) ractx->lpc_coef[0] = ractx->lpc_tables[0]; ractx->lpc_coef[1] = ractx->lpc_tables[1]; - 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; diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c index 7a96354633..19d46ffe0c 100644 --- a/libavcodec/ra144enc.c +++ b/libavcodec/ra144enc.c @@ -51,11 +51,6 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx) RA144Context *ractx; int ret; - if (avctx->channels != 1) { - av_log(avctx, AV_LOG_ERROR, "invalid number of channels: %d\n", - avctx->channels); - return -1; - } avctx->frame_size = NBLOCKS * BLOCKSIZE; avctx->initial_padding = avctx->frame_size; avctx->bit_rate = 8000; @@ -554,6 +549,9 @@ const AVCodec ff_ra_144_encoder = { .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, .supported_samplerates = (const int[]){ 8000, 0 }, +#if FF_API_OLD_CHANNEL_LAYOUT .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 }, +#endif + .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } }, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; -- 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".