From patchwork Thu Jan 13 01:50:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 33339 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp19134iog; Wed, 12 Jan 2022 18:03:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk3/pJAaefxGpX6WW9aO4qY02/j9kQYIBZ22Z5fitXTH6icKoLiTziO66GItSbZtKz+7G+ X-Received: by 2002:a05:6402:5212:: with SMTP id s18mr2273220edd.359.1642039415859; Wed, 12 Jan 2022 18:03:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642039415; cv=none; d=google.com; s=arc-20160816; b=xMPVKZLUiK3eqPOGTmbpdO3X8JlbQss9e0JIuGI3GYuL5K3U+TyJ0vRWpXIeG80lD4 1yddUiDLwxOoX0i+WGbKer1desMogoaKsqVxnkTN+aYIO80Yw92hM8pTuoEyaUx4oPp5 1y9XdPqSef6OKCgaXErMoD+4TMgeH9zxEvGyXeOHfoHquQL7P52lwsvjlpafZ/ocU423 ra0KivAHyeyDjJlX0F+oueiRjIQ2ZeUKG/R+Zc3RbgYdOwydkRCyXvezf6Fe4cJgINwm +zoIrpzPcJ62tCXrsuf/NyQVbjXPXcUtWyeDS/rULdJFkfMlstfAlajhQGWSLcewkr2F kdLg== 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=Z0UNMaVEOs4FK4MBjOBPTZfnPpKF2nmU9habfjtxl6Q=; b=q/3rsUObe+NWBZ5+d9KDEXdozFrAVbo2YzaVnALk7KxrGZnMC3MakI1rUMNmVJtMYV 4ZuxB4AVVzPLG94YBrmiXkffXIvoNL1cKBoVIwUgSH3Su/kgiLSVhZnLhUuEYsqBCG6B ztl6z+A1jMALw8T6InvJtmZi6q3rVq9cPi3EINys+IaBCB1VmYwG1K1uyWmCQk677QmZ G0EMXIvHNhkLEs6WIRUZKSPDU2Ly2HbiAADLQrwCIYZX406uMiZU1dnq5DxfBILoSbvR iVbF6awFYEsVflQlfuylbYH0EUrHBA6M6d+OKLEC2gz5mMylN5DYIM5IG+JNpF0agefk RF8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=K+6RnwVj; 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 hr33si892905ejc.247.2022.01.12.18.03.35; Wed, 12 Jan 2022 18:03:35 -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=K+6RnwVj; 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 99E1168B14A; Thu, 13 Jan 2022 03:53:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C19AE68B0DF for ; Thu, 13 Jan 2022 03:53:06 +0200 (EET) Received: by mail-qk1-f170.google.com with SMTP id b127so5626466qkd.0 for ; Wed, 12 Jan 2022 17:53:06 -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=x7kMDdiYnyfNeBQWx7bmyitW9Pkvg+Kdvs3M+OmowuM=; b=K+6RnwVj7E/Cu+l3hNYfRbdMT+tu1uHcgnxA5FvX2ny878q53hgASMn8XfOGl07alk qJU1PKk8AO1RVQAyZcAEtTNNVTIKMjrubpuY0VROFNM5MYrtB6HaLz/ek4MihixRej35 EktA+hMxAmZ1WU5yxX4N7dI/7jm1P8oNAHxA8tNGt3a8fdVsKet6fyibRacyrmQneyRd CEgXs+srXuW54kxcPVuiaUBUggIHTXCqcy/pTIvBYwFWQGOrYTzsqJd9KfmKvCw7xWl7 rhXKRQltNvOny8vl0jYZs/9LRuvx5MDIuBuxE9gEakDqVgVzQ5XGTx1EFwIICpZnWosU vjHg== 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=x7kMDdiYnyfNeBQWx7bmyitW9Pkvg+Kdvs3M+OmowuM=; b=6gcxG4dqWacTq6A+y3TP/sWtujxtWs/fuxTB7jChVtKmkHk4mswyNzH75NydTQFKdV GTOYR0uLaYdBUq0d7yOylK+GXC0bTf3EUVCzjczj3zFwnenYR+lrbum6QW0DhAn/Cyi2 RrXJPMOJHz1uAfyGnun84qwwKW05qnyD2dJN38lC2YEgKOfYoigTVCLutzwG9+vq7d5W QFCAJ19qX6pBF5eVqklmPBn6VlyR1BN5CD8ph1VWURmVUc0EhRARqRXF6K+54o/Qd2Vx sd2HzPoQ1wwbZass2/voB65A7vKXuUdmZT/BDjLWJQrLJzJtc3hd05WYwx+utkF+TpvJ S8KQ== X-Gm-Message-State: AOAM5301+VPeZEqoqI9wgUZ3G9KZ+tLfkiFvmJbDdFrvrh8dMXix+Jgc lb8VECzHTQWIt/XrOxkQYKdED0dcEps= X-Received: by 2002:a05:620a:1098:: with SMTP id g24mr1158275qkk.123.1642038785129; Wed, 12 Jan 2022 17:53:05 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.53.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:53:04 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:50:16 -0300 Message-Id: <20220113015101.4-55-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 054/281] dv: 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: l4A1h+I5OlCS From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/dv.c | 3 +-- libavformat/dvenc.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index 77a6ede37b..1dadaf6e62 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -281,8 +281,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame) c->audio_pkt[i].pos = -1; } c->ast[i]->codecpar->sample_rate = dv_audio_frequency[freq]; - c->ast[i]->codecpar->channels = 2; - c->ast[i]->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; + c->ast[i]->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; c->ast[i]->codecpar->bit_rate = 2 * dv_audio_frequency[freq] * 16; c->ast[i]->start_time = 0; } diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index b76539b59f..6e5e6c6a36 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -329,7 +329,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s) if (c->n_ast > 1) return NULL; /* Some checks -- DV format is very picky about its incoming streams */ if(st->codecpar->codec_id != AV_CODEC_ID_PCM_S16LE || - st->codecpar->channels != 2) + st->codecpar->ch_layout.nb_channels != 2) goto bail_out; if (st->codecpar->sample_rate != 48000 && st->codecpar->sample_rate != 44100 &&