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 6C5AE42F1F for ; Thu, 13 Jan 2022 02:40:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 53C2A68B866; Thu, 13 Jan 2022 04:05:47 +0200 (EET) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C941368B825 for ; Thu, 13 Jan 2022 04:05:37 +0200 (EET) Received: by mail-qv1-f49.google.com with SMTP id kc16so5158004qvb.3 for ; Wed, 12 Jan 2022 18:05:37 -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=yepPvlQTEReUUnMoSV64k0X48xsUGvKbTu18ewDCzgU=; b=Jn4n4C7Kog8YmxOBLBNzmL2Qm63TpygnsPLinCzbNVOKHyaxufUa5GtbQJPFH7jPMx FqjnGJ9+HxE2U7/XIkVSkigIQI6NOdgmyvbBYWmC12lv9TtAspD9/vlyw8oLUCUu+yMQ EBbpA+rkKpeViAr4WkFuutpV+OPIy1qIW+2T/8ShqZ4uLAvzFzZI2iyM6Euad848pEbR O2kHVvF+dVPe/XUFMeIHyo7W5WbKJXc1L1dxqROG2/Y3KhmFvfJ8ArjnsZaIrt8NaJWr sZ89d3w02fGQA+uzXFtbkRpBulBGLvcq9UvZ9Dqsvl57l0Jer9/gurWE4hO3jN+8ed8C hcWA== 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=yepPvlQTEReUUnMoSV64k0X48xsUGvKbTu18ewDCzgU=; b=Y7XAbIhojRDH7TO4ZlqbF7uzon2cJCHVl+P1uprTLOm3xAFWKEvH2DJdZ9vkL7Yfl2 0EXNSgk8I/RrsrMxPB0GpJg0cl3vRCLwJ1HROCJbs14bD3byHlEk46dEhVL65iuJQI9n 0nalDw+UNDg3xFV4V1I9VLoYOVTan77A4pnuikkDAcD4OwgWBbxcnF+tA1LWqt6giUNU aZO+X3lLP2XB48AFXDFHKPRDKJXOG6i0gybJyem7cWWuOpVL5XQ6NrHdyW6MY3VjrCac AJjxIPl7bmVkBPOuwVf/FNjQpwW5kJAcW/ZSKFGu91/HhwWO8ZFHFBSd9pCQPYV3mfqN Ui7w== X-Gm-Message-State: AOAM533jPf8+GKvIo7wcVEXYePgp2D262r2IKH6r9BFZk1pnwFfDpPHE s9vU+hgazT+HQXcLi19+BKEiGJEElJo= X-Google-Smtp-Source: ABdhPJyljJPLFjMU/+k4oP988hcXipVrgrFGSOdbUS6R6zlygYz8pFaiLQzq66syYvMMaZLqCWJ1Xw== X-Received: by 2002:a05:6214:20e5:: with SMTP id 5mr2294060qvk.53.1642039536505; Wed, 12 Jan 2022 18:05:36 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id k9sm1264556qko.29.2022.01.12.18.05.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:05:36 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:04:53 -0300 Message-Id: <20220113020518.730-5-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 214/281] g726: 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/g726.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/g726.c b/libavcodec/g726.c index 2a0148c1d5..082f9b07ad 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -324,7 +324,7 @@ static av_cold int g726_encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } - if(avctx->channels != 1){ + if (avctx->ch_layout.nb_channels != 1) { av_log(avctx, AV_LOG_ERROR, "Only mono is supported\n"); return AVERROR(EINVAL); } @@ -436,12 +436,12 @@ static av_cold int g726_decode_init(AVCodecContext *avctx) { G726Context* c = avctx->priv_data; - if(avctx->channels > 1){ + if (avctx->ch_layout.nb_channels > 1){ avpriv_request_sample(avctx, "Decoding more than one channel"); 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; c->little_endian = !strcmp(avctx->codec->name, "g726le"); -- 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".