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 E2E1742D13 for ; Thu, 13 Jan 2022 02:07:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 01FD668B1BA; Thu, 13 Jan 2022 03:53:29 +0200 (EET) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A209F68B1A8 for ; Thu, 13 Jan 2022 03:53:27 +0200 (EET) Received: by mail-qv1-f46.google.com with SMTP id hu2so5077999qvb.8 for ; Wed, 12 Jan 2022 17:53:27 -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=hiE7ul8/OB4fbka2y4pwskbuOOJ/NYFygBJvDji1p2Q=; b=IqY3JpeCfF5486N9vaNfXqO2+1P5Y8nrfR1DdLDUVnN9Whh0XwZFu8eze3q9/6lwVy e/R2R9olHPJCb3sfq8ylDIu/gkTadlGGtGkS7t9aEvMms8tC83uWDTXpFqRmzzBA5kwu Cf/k+wyP4ZMKj9Uwrb+nlt1wjsBXcgBpXAj0AT0ZLNEGZK3TzDUPj9AC66+KfV3myr/E Ehl1SpGwJnpBZ7SI2XvNx5CMpXHcOMPMarVigTjlFJHzF65MqNmNpx/2LgcIAeMtwlUo SecL3TNaasGNi3Xx5FlWKprIkFGicZQQuM0JSbYgbGPNffpHSj97anI5YFww6FXkXQtw dftg== 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=hiE7ul8/OB4fbka2y4pwskbuOOJ/NYFygBJvDji1p2Q=; b=Ag5F8YyhyKrtJOCQBAGCY9tsSM5QflrazKJhOCa2WTgJkhOioaYal7lKF7TGwsj30i Fy+fEAVyte2K3v5VvmYN0JWERkYsEoYMBPdPjM5DoweEJzHgAsQ2NoTrNpAKH7hHQgYx 3uaWe5nlJQ4ewFRNBl8x1BywfkTGp09tg1LtdU6bPL2CKiRC+yCvbuGIKbEqFYZkbD1I BuW0vu0T14NtbX1TjO6OIIBkV6eCfB2bc0xOlXiDGit03AfjCy6iaTKjbP+J9x/2aZ18 R+a+t8rfHbuPcud3tjCxoUjyOWvqDgNCDEb0RveUQwCoe0GUUl5DrIsYCQ4Zyk5wtCt9 zvkA== X-Gm-Message-State: AOAM530f6z9EyolYl08vyTuvEOJlcEemG2As1lkh3R6JYR6EOO76TcPs aPylDtzU0LiYt7OZHKOTi0ES0rUmtY0= X-Google-Smtp-Source: ABdhPJx4Qcc5De8rTXSo1bNXQv6XwbTLWDHSxiDkhOIk0Ti85X15ZTWz9IHOAf9Z0mvKutGCKJ0xuA== X-Received: by 2002:a05:6214:1c45:: with SMTP id if5mr2363060qvb.100.1642038805956; Wed, 12 Jan 2022 17:53:25 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.53.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:53:25 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:50:33 -0300 Message-Id: <20220113015101.4-72-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 071/281] gxf: 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: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/gxf.c | 9 +++------ libavformat/gxfenc.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libavformat/gxf.c b/libavformat/gxf.c index 6f370c1b57..d96e0796f4 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -143,8 +143,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { case 9: st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_PCM_S24LE; - st->codecpar->channels = 1; - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; st->codecpar->sample_rate = 48000; st->codecpar->bit_rate = 3 * 1 * 48000 * 8; st->codecpar->block_align = 3 * 1; @@ -153,8 +152,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { case 10: st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; - st->codecpar->channels = 1; - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; st->codecpar->sample_rate = 48000; st->codecpar->bit_rate = 2 * 1 * 48000 * 8; st->codecpar->block_align = 2 * 1; @@ -163,8 +161,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { case 17: st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_AC3; - st->codecpar->channels = 2; - st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; + st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; st->codecpar->sample_rate = 48000; break; case 26: /* AVCi50 / AVCi100 (AVC Intra) */ diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index 133d1e9fb3..e25d8764ba 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -714,7 +714,7 @@ static int gxf_write_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "only 48000hz sampling rate is allowed\n"); return -1; } - if (st->codecpar->channels != 1) { + if (st->codecpar->ch_layout.nb_channels != 1) { av_log(s, AV_LOG_ERROR, "only mono tracks are allowed\n"); return -1; } -- 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".