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 6D36642EDA for ; Thu, 13 Jan 2022 02:39:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3326F68B83C; Thu, 13 Jan 2022 04:05:44 +0200 (EET) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 68F7868B7FF for ; Thu, 13 Jan 2022 04:05:35 +0200 (EET) Received: by mail-qv1-f45.google.com with SMTP id iw1so5174524qvb.1 for ; Wed, 12 Jan 2022 18:05:35 -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=FQI5kN2RHoAH9KcyFyHkSO6Sk+Cnf8L1w8aEU+qQ1p4=; b=B/ZnWkt6WcCcmuEx5MRS4MSXZXwAr8Ht7lYBi5UedL89DNH3A06w/EaVLuPTfCzGcv 9nKKTHet9srREVZwggJT+FDRsBhttZUWACF1w7awhxtN0NhfcGZXPf+mZkXTxu2lrdEx 2g1nuTTXScoyZZ60DFfy4J+7no9k8N5u+F6qmeJ+W+VZX2vYfS53hlY1NwxUKkK1BsGf uwocgN0oHa3h1qdlBjhZvLdlE5XTCjWlQCGlIjCdEgwWkt01ClzhIuKk7IqTmutpmlPF aL/ZXAMxMbaNOfFg37yc7M1UkV2V5EidoDupGVJXVyhNDKBODkYYaHqMvB9zf3MUgm72 ji3w== 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=FQI5kN2RHoAH9KcyFyHkSO6Sk+Cnf8L1w8aEU+qQ1p4=; b=Db+tKA1Rh2XVVI4gK5wekaJ1/+WTx+7s+zjjCgvfBB/k3vBLRUvXc7Aty0F9icQ3Qt vDYlFnGg3LVoWrPrgUWamf2vh3D7M/K3itiZahqHSknoSNJX3BuFgew+M/HAFjL3ljcH LDAb9QmbAZ/GdBMmACNZfsoEPwvZWRpTYOOUBuQGwhGIcy8s8zb+vqS6fReICdLbXdbX l9qWu5WBf5SwgJiv/zkdw2i92Kv8y9OzNrdsEeotWiEqfGh+d988z+13cvnSTvnaJJiM is6uXPjEvjMdIDTctC7RxW7w00uJ+E7H3QSFqBr9bYZcfTc9lt+rsY6KFO4s6/BfrwFR b6ig== X-Gm-Message-State: AOAM532e5/IKvOv9P3wT1JRGujqq5zDx3mlTKJtFfOH/r7hQea9pnndb 8mmGXt0fWIdpjbRrXtNH48PSvcTxRhU= X-Google-Smtp-Source: ABdhPJw0yl5a025nrKPCC6eCyoPHIC8r2uqMnVGRdyHu8Sbo1vgi2RxhV1HqTWLUe8qmiy6SaZxQRA== X-Received: by 2002:a05:6214:f25:: with SMTP id iw5mr2447543qvb.72.1642039534133; Wed, 12 Jan 2022 18:05:34 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id k9sm1264556qko.29.2022.01.12.18.05.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:05:33 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:04:51 -0300 Message-Id: <20220113020518.730-3-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 212/281] g722: 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/g722dec.c | 4 ++-- libavcodec/g722enc.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c index 5ca0d0e2b1..879ea296cb 100644 --- a/libavcodec/g722dec.c +++ b/libavcodec/g722dec.c @@ -59,8 +59,8 @@ static av_cold int g722_decode_init(AVCodecContext * avctx) { G722Context *c = avctx->priv_data; - 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; c->band[0].scale_factor = 8; diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c index 75b926ef8e..6010a6d5ae 100644 --- a/libavcodec/g722enc.c +++ b/libavcodec/g722enc.c @@ -381,6 +381,11 @@ const AVCodec ff_adpcm_g722_encoder = { .close = g722_encode_close, .encode2 = g722_encode_frame, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, +#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 | FF_CODEC_CAP_INIT_CLEANUP, }; -- 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".