From patchwork Thu Jan 13 01:49:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 33303 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp13585iog; Wed, 12 Jan 2022 17:54:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6QcOH69gUoEADNgm3JgnN3IvmnoQR+Ri7ykZmmC+JlZMMYIDbBWdlwU8Xd9nFSD0Bv8EX X-Received: by 2002:a50:9fe6:: with SMTP id c93mr2245755edf.170.1642038882198; Wed, 12 Jan 2022 17:54:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642038882; cv=none; d=google.com; s=arc-20160816; b=s+MVgqYR7d0sRaCWnnNyDgCkafaNdlJ0fMwWfW49GeZt69BttkwokqckTs/mIjClBp 8kKUOU0twbViPOWCXI6QogBx1lg6RD06EfBkZxMcvnMWcdIJ4m+u3nTWkR/gtXPxPF5A OiaTEOXIuBlTNibiQgQXJzK6VIUVCUtpix1lc5WrH2kKrj1HB7ZuElc0ry8/vVRrX8TV eC/V0GPp7bP5esdAspdFn1JFA8pfhJ+7clI4pQAPLYSPy/qYQlWVh4dag7wno+SbP5yq aPUJrzQe/kLWdshiF33IupmuyXoLONGqZ5W+uT4Ufr8FYSuYj/BxqwJLWFjN9u8LmDFj HH9Q== 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=jYnPIOvUwf5tJ9+LUVe5m0GOqyWyQB6gBTvzI/AB3wM=; b=HLN5lagK0gj1zicbA+udY386eSOiqYc2l3NaDGJEyBG0cE98vRMLxldX6jBAgqhSWS xgP+Ku1SikFoSnG0PpFT8zBOtvyH7kezID8WSLKiOx54r1mQURy8vX2xwIwtBzXSt6Ig X3HzTR21y3FUmMM6mTTOUVtkbgctcsEJQRUWx9gYj4K4ZC1OBCU3sNFjnEdhh5dWQyuY Tfv6bZRRt31EqdyKY8oxEgG/kGQncIwdDKIG0cYDsUAWtEfRDhJa838wVrKsycIhbl53 RQ2L/XB5ZyQGNg4pfoY6qDArWA4A6RIchMVvXQLQJ2ybQgpv+ivAyujrEEL+4IgQFMDh NeNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=H07GV3KN; 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 hw19si275323ejc.656.2022.01.12.17.54.41; Wed, 12 Jan 2022 17:54:42 -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=H07GV3KN; 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 BCA4F68AF97; Thu, 13 Jan 2022 03:52:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC16968AF36 for ; Thu, 13 Jan 2022 03:52:15 +0200 (EET) Received: by mail-qv1-f44.google.com with SMTP id 15so5045077qvp.12 for ; Wed, 12 Jan 2022 17:52:15 -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=nOevSgymdots+DtYaPcqX2wL+D2xwSHrMGGO5rjYl5A=; b=H07GV3KNsOrwnQIWT23jEU2/JLXatIm6Bb8AJKTfvPLdh6c4ZXW+BXDFHzGtT2J6Db dfhLpd2RH/drGbULWn/uEwHLttnjLBeDFvHrUmXnRNz7QCprZ+u+/42AfxAaEh7tdnN1 P8AFfwi3NEyUTJTjlqiL4aZMdMc3qvmPZPtZMqiDB4GUIWuzW0OQv78dmjc/IQ6pY6MO zQzupIGvW/P3JPvQK4CyvBuzV4hLI5lSueuCyy5bUlK+yw/tO71nBzi6aXtncJlIWdZa JzRoXUZD3sUO59VA93QkAv3pgkpli+HlB2tmm2KyWFLH65saR0W4Wp6qs825g783HCDK HDoQ== 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=nOevSgymdots+DtYaPcqX2wL+D2xwSHrMGGO5rjYl5A=; b=z4B3uH/tWS0ImcFcGsyDkz9pxVtX1joeyDA269pOUrpOAAWfE2gd0BNPnpnZtXwE9t 7H/y49I41ZyAsE6HaGP7FT1zhrEi0yq5SKlmg63GlwyUQ8JbWXWVsf/Mj1W8pTuY2ncj r6rCVvknZ9U7bNw75vhD4xOYF0PUVf1ndULPX5/sAp9MvDrQXfLaDAyQ+5MsGv///+ZT u2dFXb64Bp3VdOQnX0EidE1UggMfYOQZFGfiUZNBoMD+fCNtnTwpGdgK8WZi5Grmslgs J49fj+4OJh6qYQ3LM2BQdfFkN5Y/JOAmhAYVlAFrpoBw5oIFiK76voA2EKkmqYMacPU4 R11g== X-Gm-Message-State: AOAM533keDv/idJbOJ8kzPmlEiHVokssvkEVtWl1XPrmliJW8fItZmMN 6VOVsq2/MAqeNHH7F3SA0s+JGNyeOH0= X-Received: by 2002:a05:6214:2307:: with SMTP id gc7mr2206927qvb.77.1642038734060; Wed, 12 Jan 2022 17:52:14 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.52.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:52:13 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:49:35 -0300 Message-Id: <20220113015101.4-14-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 013/281] ace: 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: QEEUJQTpTtfZ Signed-off-by: James Almer --- libavformat/acedec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/acedec.c b/libavformat/acedec.c index a52a0f0e54..74128e0a6a 100644 --- a/libavformat/acedec.c +++ b/libavformat/acedec.c @@ -74,7 +74,8 @@ static int ace_read_header(AVFormatContext *s) st->start_time = 0; par = st->codecpar; par->codec_type = AVMEDIA_TYPE_AUDIO; - par->channels = nb_channels; + par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + par->ch_layout.nb_channels = nb_channels; par->sample_rate = rate; par->block_align = (codec == 4 ? 0x60 : codec == 5 ? 0x98 : 0xC0) * nb_channels; st->duration = (size / par->block_align) * 1024LL; @@ -85,7 +86,7 @@ static int ace_read_header(AVFormatContext *s) return ret; AV_WL16(st->codecpar->extradata, 1); - AV_WL16(st->codecpar->extradata+2, 2048 * par->channels); + AV_WL16(st->codecpar->extradata+2, 2048 * nb_channels); AV_WL16(st->codecpar->extradata+4, 0); AV_WL16(st->codecpar->extradata+6, codec == 4 ? 1 : 0); AV_WL16(st->codecpar->extradata+8, codec == 4 ? 1 : 0);