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 1A84C42F24 for ; Thu, 13 Jan 2022 02:41:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 664FE68B8BF; Thu, 13 Jan 2022 04:05:55 +0200 (EET) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7861468B89E for ; Thu, 13 Jan 2022 04:05:52 +0200 (EET) Received: by mail-qk1-f170.google.com with SMTP id t24so5555641qkg.11 for ; Wed, 12 Jan 2022 18:05:52 -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=MrxC1q1d/enT7ewRvlWf6+b3ZBZOL12gNloFIYGliX0=; b=Wh6biK+tZhUZWCf0uMdulOUzDtQ3OtFMa14dopUGrEspp3sYs9SiZuSPkDyTHM4Sk4 w2SycirTbt2ZtqWoh2q9hZVegcJYDfSx7m6s6AX+CmATZAwQJZoQWqqKu3JrjoiSMAua C1+SbOzjOD5EdjMJXqIrVkmGjixYmt6ZVPBTGph/mhvd//zv+21FxBQ28oIW4K33OlL9 YPLwnNIKuKE87snE8TGialtoN+p1zubPK23shNSfi6sbpzy0llmUxPhQ4JmRe/R5pPqP GEwjL29q+bj6HK8CImoZHcMaSmfUGneMExKjQiNZSBVHZAhuReBNNnAnULdOLCM1PLgX dvAg== 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=MrxC1q1d/enT7ewRvlWf6+b3ZBZOL12gNloFIYGliX0=; b=eIWqf4rb4zZHjSk0Dx2mBWnGZAiiAjGBWX6HEuVBN5h++IFoqcO0gC4Bev6exet59b nqwgMCLZYWKWESum9TeBXskxUITJIXlj/rdxwsXjOjGAiFMsg6UO3+cxn5qVfFDctQml yCdXq36UaGuAj1LxCjul0mgiQYslSQA9L7MsQAvgseqhj9xXltMgKad4pbsZ3XP70Y5M NLpWAgeYOPS7AuhNO37eYSI4HuY0OKZta/6ywgWs0d1462znew7XWGCfhUOPb8CjUZPO pB9gZJJFk9IILIZw4p2+MAx19RNqiX/cTj7PF6Xok5hdZC0ayGdClRDudLS4/xIiMFyF TwFg== X-Gm-Message-State: AOAM5322O1tpIDex761ylalP5+vhEDNnVMBaj6M52Xj5AwNoX0qpmFoG lqNGz5J/AGOt7TgggIpnfa+C3lLw9mM= X-Google-Smtp-Source: ABdhPJw2X0enTxoG26/5GUWyPjjJxbv87JJia9cqqipuZTCK5bfcb9VN2OovVYu77vq7Ah6HIob+nw== X-Received: by 2002:a37:ae06:: with SMTP id x6mr1902954qke.13.1642039551066; Wed, 12 Jan 2022 18:05:51 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id k9sm1264556qko.29.2022.01.12.18.05.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:05:50 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:05:05 -0300 Message-Id: <20220113020518.730-17-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 226/281] libgsm: 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/libgsmdec.c | 4 ++-- libavcodec/libgsmenc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/libgsmdec.c b/libavcodec/libgsmdec.c index ae4a952d99..aa028bc262 100644 --- a/libavcodec/libgsmdec.c +++ b/libavcodec/libgsmdec.c @@ -48,8 +48,8 @@ typedef struct LibGSMDecodeContext { static av_cold int libgsm_decode_init(AVCodecContext *avctx) { LibGSMDecodeContext *s = 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; if (!avctx->sample_rate) avctx->sample_rate = 8000; avctx->sample_fmt = AV_SAMPLE_FMT_S16; diff --git a/libavcodec/libgsmenc.c b/libavcodec/libgsmenc.c index a2f6c1c62e..f73f254d50 100644 --- a/libavcodec/libgsmenc.c +++ b/libavcodec/libgsmenc.c @@ -49,9 +49,9 @@ static av_cold int libgsm_encode_close(AVCodecContext *avctx) { } static av_cold int libgsm_encode_init(AVCodecContext *avctx) { - if (avctx->channels > 1) { + if (avctx->ch_layout.nb_channels > 1) { av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", - avctx->channels); + avctx->ch_layout.nb_channels); return -1; } -- 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".