From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTP id CC3B642F93
	for <ffmpegdev@gitmailbox.com>; Thu, 13 Jan 2022 02:49:59 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7B2C968BA2D;
	Thu, 13 Jan 2022 04:08:01 +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 C51C968BA14
 for <ffmpeg-devel@ffmpeg.org>; Thu, 13 Jan 2022 04:07:58 +0200 (EET)
Received: by mail-qk1-f174.google.com with SMTP id t66so5594933qkb.4
 for <ffmpeg-devel@ffmpeg.org>; Wed, 12 Jan 2022 18:07:58 -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=46PU4gtjzdBg/4pW8hcCrfwVOYEqd7ErCb06kEwKaQY=;
 b=OoIMnipkjhN4s46YpASZwEQ7IKVAIDx4IqcI+u8qvUnnjfqdzkwURfzBz6YbC8GHUk
 VCEqkKPZ+uEL+kM/suqZal3wDmp4lE+5893mEtBZf/dD85ZmWZPW5uoPFoXODfNKTyTC
 1NVzclbzTIWqhPkBThhhIwToW9W0r7THhL1GrrzZ8nBc+JrxMJOjBYqwaqRDC9ft5ty+
 juZWhJr6Oa7mnfOHBgyPWCb6IX244LfHtCCnUxuSwWzVxxOSR1SiM24affhIDmiDzeZ0
 U0HNnCGE5gCqRSi5WGZLjSQQA7e3PuF5WS8LVrBWBtTx5JI72Bu7P892cCg93iaQpH/M
 lJ8A==
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=46PU4gtjzdBg/4pW8hcCrfwVOYEqd7ErCb06kEwKaQY=;
 b=tex+syemnFu6/8atXmDStL2Izk1E4V1TWUAiXewyUyiamRE/kj15CdFD4g2inyTgOB
 DBWFxOXChdEEHMqJqGUfqMw3IyZkPhcfa/KZ2GE3TSuufz2jZ+mjg8iO6BgiirrUIfOQ
 1t0L1YQpxbSI2WunWMYCSATN54GQn+W3IpnFhNk0QNDrEaB8MuxTwxBIrW0PZuijLU3R
 AO+ZTbcuioWNmpmBWAagn1PT9mKJ1Ze8BGPjd04FnacsPl0dhq57tuLvLa7hLsbxRYnQ
 yKaESm/lTlaV0QFiGl916AFJO91+2EXSa8vbI0tpAGtfRSXB4VbmfZcCTz5J9/auijn/
 kuRg==
X-Gm-Message-State: AOAM533K4/BZrYo9fEDbDFNS83qeehy4QS3L4WoG4uInr8CR+59wWh6x
 ZOQy9eVFGNmVleyRxmesAbH9eHs1n0E=
X-Google-Smtp-Source: ABdhPJz8BCLI/WwlqurN3/kvPI09nkiRo9fctVwugEcSC3yKOqc4moDgXKbU0vX69WU5QVBsgqe9lg==
X-Received: by 2002:a05:620a:24c9:: with SMTP id
 m9mr1848324qkn.615.1642039677243; 
 Wed, 12 Jan 2022 18:07:57 -0800 (PST)
Received: from localhost.localdomain ([186.136.131.95])
 by smtp.gmail.com with ESMTPSA id a16sm1085946qta.13.2022.01.12.18.07.56
 for <ffmpeg-devel@ffmpeg.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 12 Jan 2022 18:07:56 -0800 (PST)
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Date: Wed, 12 Jan 2022 23:07:07 -0300
Message-Id: <20220113020713.801-24-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 263/281] truespeech: 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 <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20220113020713.801-24-jamrial@gmail.com/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

From: Anton Khirnov <anton@khirnov.net>

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/truespeech.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index a65ced15d7..30a7e86a75 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -64,12 +64,13 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
 {
     TSContext *c = avctx->priv_data;
 
-    if (avctx->channels != 1) {
-        avpriv_request_sample(avctx, "Channel count %d", avctx->channels);
+    if (avctx->ch_layout.nb_channels != 1) {
+        avpriv_request_sample(avctx, "Channel count %d", avctx->ch_layout.nb_channels);
         return AVERROR_PATCHWELCOME;
     }
 
-    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;
 
     ff_bswapdsp_init(&c->bdsp);
-- 
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".