From patchwork Thu Jan 13 02:07:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 33523 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp45892iog; Wed, 12 Jan 2022 18:50:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmwPpjhfAmhI4luHVp2g2N1cNeCkYPC93/2PH689QpqSC/aPZxZITpGFKM5kWUy48oCRxS X-Received: by 2002:a05:6402:3da:: with SMTP id t26mr2392211edw.116.1642042203464; Wed, 12 Jan 2022 18:50:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642042203; cv=none; d=google.com; s=arc-20160816; b=ed6uldBOX3XtzNJOT/3uoMyOe8cicCv1HKEgHkiqeQEqnWh51VV/zIeGzzLX8thYFk /4UvYQkZ3ICMt25QNK3EfkF7ogqSehTY1ZCye9x+nxpSYZa/Oei2pbuL7m8w7HtPVNTu o2QObAAeKSi+MzrYJSsmb3gqvjHlFamIFWe1w1p2sy3Bef8vo1OY6RvfaL5nqPiktIkj EdlylAktpNnfVw/7E+RhyfJubFWeZMvpvecNSGKdRulCTz7oxmDsEMFoiSjYJZ1DRYJJ wdCeaeeNSWWhpBXrO+kLL/dkBhSuD/PpR/GZ+VUG/kdmQqjLCHR4yPAYzXiFzzeu+Ma8 WkUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=HsZipvkUtFDmJ5JTuRvYRRrdK6DvIqXzoHlN+b2k49w=; b=MP7URRG1CZAq0KcO00qXMnI0bIcq0VsjpcqeMxiRmoM1gbwn6Dc4Ie6sy/vAHXHG6r dwf453x51jqbxMp8iHvL5khdIMXvOi8LSxdVxzciSuhuod0sfh7CaOs+uq0aWNxpJOsy ZzrOBPDn9OmjfF8CKRnGEdpDKF6eHSH1S1BDIV5tE281PL0PDfMb0WtBU2hAxYdRK8Ex 9No93OBF7RBiJrEyQdZkrFGT+KrWlZq7K4nNearApEVqQpIPuq1g4Ti+/Ezq3FObqG1a 1TiOnGalW8+o/hdjEnG4y0zt8yVxrUutOtbE3/Q/JARzBIWNqQzw2JGcqZnWTxhgb9DF EwtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=OoIMnipk; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w16si765572ejv.537.2022.01.12.18.50.03; Wed, 12 Jan 2022 18:50:03 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=OoIMnipk; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A19BE68BA27; Thu, 13 Jan 2022 04:08:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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 ; Thu, 13 Jan 2022 04:07:58 +0200 (EET) Received: by mail-qk1-f174.google.com with SMTP id t66so5594933qkb.4 for ; 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-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 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:07:56 -0800 (PST) From: James Almer 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: QhcMNBsE4rPg From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- 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);