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 A579442D33 for ; Thu, 13 Jan 2022 02:06:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6693C68B1A6; Thu, 13 Jan 2022 03:53:26 +0200 (EET) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A7EA068B186 for ; Thu, 13 Jan 2022 03:53:23 +0200 (EET) Received: by mail-qv1-f51.google.com with SMTP id kl12so5083821qvb.5 for ; Wed, 12 Jan 2022 17:53:23 -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=M1W4cnsspg5bK+Vm83AcnicJmbBrqeHeOuXhIt7zSLU=; b=TioEJpX/qp7nJYjLJOP2V85euCfe9lCkWoIe8rAlMjiENzgMJocJh8hwsg7FSIX1I6 HM4OyxoziDUoAV9M15zwwipXGUkn43YAJ2s/k5Skgn/ruD6FMxrlEqSd04DZd/PZFONb 9p23gP6NQ4nP9QGZM1s+6pN7CJ/OUPFadKEShQa/xWKnZ3eMQxW5l6C0zhId3soQcU4B Zmr6Ypsdg/x+/U67fFB6Br+dvUnY7uYwmCAQR5u2Xq4u9k5wrpxoSPshtfvfdZF90bY6 cQ+rKF8t/8R1oDpY+YGpbBF6EtEL9I8+4Gadk5qYETQxLfC/QfIK5TQ8CBuT6+l8hwWV asYA== 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=M1W4cnsspg5bK+Vm83AcnicJmbBrqeHeOuXhIt7zSLU=; b=fFtK1vN00P/zBYvoId07yS+1CC5mzpD1J7Dpaa+E+w6MEXjVC5XsyH4LCabT+LTbGQ DeytgG3wLeWmN1JPL7maP03R9YIyBB6QougPBAbEsqZ7Ldx6V88yMRUVo/V2Hpc2+iv+ umA2j8mvbjfmKSRQMREmnV3TEXjLYt46cFCaFqDSFqhsPjd3aQZgsp1WS2YteSEVMiBO Zi48i51Rie9o8FDySe9ZK9bXcF8Kk/D7sfmFi0NBMUygMZXGzmpdelkPvrXPrz2HqK3w ECsp53mswwr2aMsraMBgJ1EhASJMdxnuF16Dwt90rF7YSDBQWv0VqQnsabYh0hd8+28k Zzlg== X-Gm-Message-State: AOAM532ktJBsBapnGNCh3A+zEjFpnJ6gwEggrdHyXT0lVDDmt4cRI3Kv bOgXj6MKSMoQ/kBw1wL33n6BHVikHfU= X-Google-Smtp-Source: ABdhPJyC5MA0FL7YU8FB4AInnsfzwgZXwdRbQFdH7YyWyeztUFGA+YzsbZ5QJyJrbrp/gGRETDH9Jw== X-Received: by 2002:a05:6214:dcf:: with SMTP id 15mr2202062qvt.47.1642038802319; Wed, 12 Jan 2022 17:53:22 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.53.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:53:22 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:50:30 -0300 Message-Id: <20220113015101.4-69-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 068/281] gdv: 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: Anton Khirnov Signed-off-by: James Almer --- libavformat/gdv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/gdv.c b/libavformat/gdv.c index b20691a2a4..f2e0748b6b 100644 --- a/libavformat/gdv.c +++ b/libavformat/gdv.c @@ -99,7 +99,8 @@ static int gdv_read_header(AVFormatContext *ctx) ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; ast->codecpar->codec_tag = 0; ast->codecpar->sample_rate = avio_rl16(pb); - ast->codecpar->channels = 1 + !!(snd_flags & 2); + ast->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; + ast->codecpar->ch_layout.nb_channels = 1 + !!(snd_flags & 2); if (snd_flags & 8) { ast->codecpar->codec_id = AV_CODEC_ID_GREMLIN_DPCM; } else { @@ -108,7 +109,8 @@ static int gdv_read_header(AVFormatContext *ctx) avpriv_set_pts_info(ast, 64, 1, ast->codecpar->sample_rate); gdv->audio_size = (ast->codecpar->sample_rate / fps) * - ast->codecpar->channels * (1 + !!(snd_flags & 4)) / (1 + !!(snd_flags & 8)); + ast->codecpar->ch_layout.nb_channels * + (1 + !!(snd_flags & 4)) / (1 + !!(snd_flags & 8)); gdv->is_audio = 1; } else { avio_skip(pb, 2); -- 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".