From patchwork Thu Jan 13 01:49:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 33300 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp13300iog; Wed, 12 Jan 2022 17:54:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGfQOXvQofQPr2g0Xo2FTUKEej3nwRVOD+hgExokVKalt49n+9SmvK8YbsejHo8xhrDqgu X-Received: by 2002:a05:6402:888:: with SMTP id e8mr912920edy.9.1642038851380; Wed, 12 Jan 2022 17:54:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642038851; cv=none; d=google.com; s=arc-20160816; b=jofZCE4x6ZDHCO0eoOmBwWizW6M0i0ksCCs9V5fYX4ntETiE1i3F+8ux5jphG1PtL+ vNyn9cHrpGCYwCFTEMsIxKxx0eCYAI1V+bl0Qz0YJn7E8ay4Ofr345QHWadspim5vW05 dUAhy8pns6YdJD4Zw6GU243qcscLIWLvurHmiLdPLvVcDrttjCdzkcQep2hO6O5H3DuI vamaIf2dXWvSelXcutfZ76bGhW75GwaJxr/HJO5sfGM/Ed609ZmorFHEZVocQcDAAt1M TWlLL1VbO64956p+UfSMycO1L7smhLmZDo93cOzV9Wnj5ZpzZatBLws+oI3dgNViQTS8 v3rg== 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=utyMJz8e+MyDcr09zhwIuWPTBtVmbsDQtvR35kZmEbk=; b=QdH+W3k+w0Pdb8Pk/cTWSnCx+c2HGCHJW0pHyFqL7stRNSYmkaSsEP5SjvcY8rFjT8 WGU3BY+HXoMqk5TjRrGM68Zt6tiHsnT5umwPnwZ3YLfLTNzMQiRRVqXelZsVBNlIiDUG 9K47HS/p22/9+Mq1lnQHmjvfKJRFx7BuAZ0mWsNx78I6983rr8bt9EPwQHDB3xQ9A8hK 3PP+/8RzMVXLH1YbBkcYdHNHK51ik5PIz7KQmkDNJ4ppLdPdvdI2/IlwRC7iLyKf89Ao Vlim9DinnhgnNbHoQbJUJ7sF2XQUrzOSRR2WqO9d/DLoeMb5n6nuLGY4+qiuCo/i0iZi GJgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=EQhnElEl; 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 k23si791832edx.444.2022.01.12.17.54.09; Wed, 12 Jan 2022 17:54:11 -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=EQhnElEl; 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 D10A368AF7F; Thu, 13 Jan 2022 03:52:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 358F168AF36 for ; Thu, 13 Jan 2022 03:52:11 +0200 (EET) Received: by mail-qv1-f47.google.com with SMTP id l13so3579493qvz.10 for ; Wed, 12 Jan 2022 17:52:11 -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=+T+KQlHQqQ385y+nuOA5g8BeBSQeVVGD5aSbcWZGY2Y=; b=EQhnElElkCFNTMq4MzY0SV1Xux9euULR1CkYQecotc+pSSig0TdlELu6fTF2CPEcCi DQR3WQ75iNhLJvvEyeYXYkz4NqRzlS8SF3OZLmtRkYXEgfmIVgllZ3ZN4UWMCFhbeUTH HV8ej4C2zj21pC1I2p6SEuwc2kr8sDdvx6hEzb/6+7MopDsRwIiwmuCnSSXSwjuYZodq +hXFPzrq522ogNPq6pdGbaiv/f+6dnndUUaOaHu/skaDHuviyyBntyGekjTiNlX8QLGB /LjGc83P+Rn9WUrk5xoH2LjTcwlRM0KbcbvPB2rXscwxLibu1/2NNOkvGLWnbJxo7OPS 9Whg== 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=+T+KQlHQqQ385y+nuOA5g8BeBSQeVVGD5aSbcWZGY2Y=; b=vzUehfWVSBTfm4E3Axj92YZB38IYbTjbM8KP00SIB2/Rz24ZphonBGudecdxyKZkpo VzxX3HtY+qh31fUyy29qBx7ufT/zEMfogiPbeYx8tmbEuWaZromQRuIYZZVEkKiHpkqZ eLcQrgSrYCxydxJyhmSNzh7jEhWnKIz75E0NSc6rqv5wl0XqWCZLeTf4QsWjQZYs7Z90 YcZHTHS26d3nS3NVY5Ru2k9rqXrecAdL3Eg9UqhbrQabW78rxfEw1mhv4JmVvhhia32u HWQHIjW7xyZzeVx5D+bh89ci7tr020V//5knZ8mtwYrdZcjooHxjxPeaAGHDo0iE9jU0 IXbg== X-Gm-Message-State: AOAM532m3CPLAFTjd1yhkm4sfU/kQ9lQhFo62YJggWvMKua7hNY4DrAz usAejdsVg0wyQR95ToMgLGd7ynEJCok= X-Received: by 2002:ad4:5964:: with SMTP id eq4mr2247849qvb.109.1642038730304; Wed, 12 Jan 2022 17:52:10 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.52.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:52:09 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:49:32 -0300 Message-Id: <20220113015101.4-11-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 010/281] 4xm: 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: Eo+NrH+cxy9V From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/4xm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/4xm.c b/libavformat/4xm.c index e307560014..4d735a1a6f 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -190,13 +190,14 @@ static int parse_strk(AVFormatContext *s, st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_tag = 0; - st->codecpar->channels = fourxm->tracks[track].channels; + st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + st->codecpar->ch_layout.nb_channels = fourxm->tracks[track].channels; st->codecpar->sample_rate = fourxm->tracks[track].sample_rate; st->codecpar->bits_per_coded_sample = fourxm->tracks[track].bits; - st->codecpar->bit_rate = (int64_t)st->codecpar->channels * + st->codecpar->bit_rate = (int64_t)st->codecpar->ch_layout.nb_channels * st->codecpar->sample_rate * st->codecpar->bits_per_coded_sample; - st->codecpar->block_align = st->codecpar->channels * + st->codecpar->block_align = st->codecpar->ch_layout.nb_channels * st->codecpar->bits_per_coded_sample; if (fourxm->tracks[track].adpcm){