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 4975C42D13 for ; Thu, 13 Jan 2022 02:05:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C39C068B17E; Thu, 13 Jan 2022 03:53:21 +0200 (EET) Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09E4B68B174 for ; Thu, 13 Jan 2022 03:53:17 +0200 (EET) Received: by mail-qv1-f48.google.com with SMTP id fo11so5071026qvb.4 for ; Wed, 12 Jan 2022 17:53:17 -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=WSKpFqxcUwLPluybIc+WqhJhewWn0zO+5bfvBPYpO8U=; b=DDrPfOb7/bFa/o/4lLg7ab3tlzkt8J0kqojppUDuBhHsv/ogJO65U5+BPTcTY6sisO 4vZek+ZSpTDdbwMNohP1fufHH/1ZRWmmf/c0c3BotLE45RYwxbNBgbdwh5kdUIeCavxz Uo3ECK0nTCG4CksAiExK53mN6c3KRzZZUOuxT1PN8BE+44mr3lA2OwpsJVJ+ghY4hGf6 7Gkl72M9z8M+9FWHbowB9tULaomjMVs5oN50f4S+LAlzP1/ZzZumIy2X093Ewd+3dme2 8ZTOTApJ/WpgTmekmMoaDNvFwgXfsfAmmB/3NDn1Qm3rGucv1zlQzL1Mww6Ci/VXSHrD pwhg== 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=WSKpFqxcUwLPluybIc+WqhJhewWn0zO+5bfvBPYpO8U=; b=IEnzMTC0sLH5DyxN0FGRR7UK5IHY6DXDDw0NrVyxejzzhQIfrCvPyPwjwAOVCTsVMR 5G8CYvF1ZRwsy+0J0KzuOVJxHINCw3rIRbuyO845c8CO/ET5Flp2KA/I1TukwtUdGFus I2Fy3g3m/VOw070Oi9cHgA+Nojq7D389GaLDk3jBrUa7EN8jinkESGLvTMyM4nC72Z9F xcSn+MT0/y8J9WNKDZLptYuO0rYQRPF73P95mFhVZ271sv1TUo4UUXOb4kcb1mpMwp76 zIaxUTui3mBrRY7gBtCxIn6dzj5opvL7p8haGirC5HrFQjidP1QVlHTXymw2tbn6r+YF cw/w== X-Gm-Message-State: AOAM530WSiRXWAfl7xbpRD5Jbe8AtSLYAKdTUxkWE/oI6ANSYalqDrof gPTBPpC1eMgpEW7TFIJEd/1LhXJRGhY= X-Google-Smtp-Source: ABdhPJw61vOaslavIu1bFMjL+OVKzXtNgGJwUqteSW8niLiTYhJ9Jf9Ijk9IgewnjtA/YP4o9z7sQA== X-Received: by 2002:a05:6214:29c3:: with SMTP id gh3mr2432274qvb.112.1642038796360; Wed, 12 Jan 2022 17:53:16 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id i21sm1204710qti.31.2022.01.12.17.53.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:53:16 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:50:25 -0300 Message-Id: <20220113015101.4-64-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 063/281] fwse: 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: Signed-off-by: James Almer --- libavformat/fwse.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavformat/fwse.c b/libavformat/fwse.c index ed8cd3a6db..28a322d9d6 100644 --- a/libavformat/fwse.c +++ b/libavformat/fwse.c @@ -40,6 +40,7 @@ static int fwse_probe(const AVProbeData *p) static int fwse_read_header(AVFormatContext *s) { unsigned start_offset, version; + int channels; AVIOContext *pb = s->pb; AVCodecParameters *par; AVStream *st; @@ -59,13 +60,10 @@ static int fwse_read_header(AVFormatContext *s) par->codec_type = AVMEDIA_TYPE_AUDIO; par->codec_id = AV_CODEC_ID_ADPCM_IMA_MTF; par->format = AV_SAMPLE_FMT_S16; - par->channels = avio_rl32(pb); - if (par->channels != 1 && par->channels != 2) + channels = avio_rl32(pb); + if (channels != 1 && channels != 2) return AVERROR_INVALIDDATA; - if (par->channels == 1) - par->channel_layout = AV_CH_LAYOUT_MONO; - else if (par->channels == 2) - par->channel_layout = AV_CH_LAYOUT_STEREO; + av_channel_layout_default(&par->ch_layout, channels); st->duration = avio_rl32(pb); par->sample_rate = avio_rl32(pb); if (par->sample_rate <= 0 || par->sample_rate > INT_MAX) -- 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".