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 CB5E642D6E for ; Thu, 13 Jan 2022 02:18:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 68FBF68B32C; Thu, 13 Jan 2022 03:58:37 +0200 (EET) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2938068B03A for ; Thu, 13 Jan 2022 03:58:31 +0200 (EET) Received: by mail-qk1-f176.google.com with SMTP id z10so1214545qkf.7 for ; Wed, 12 Jan 2022 17:58:31 -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=7zF9X52Z5zEIH3tyffgGEpNE9zCzMNtaHS+mAfwTlHE=; b=Lhv+HdQpBRlyS4ietCxJRQGsEXXer4S5qk+V5FLUIH/P5f3gQQDjbDhQ3CiPDAuk9w fB79olxHrbGzrfZf2SQZ55q6vHQAhndK2qSD1tYdzlS+h8P0Ym7Ki7cEULEmi4nLJO0M tssDEuBhs/vIMXdHjbLcohm51nsW1PI6NzsAx2Z+emwk9VPWS1cXBlO94kSPb6gxCz8Z BOg7b6eBZLPTDAs72zDGnxgJwVHWCnoO4G8lrUivzkSPYPoYpWkRmq6Jv2GPdZYqKNj5 9Ah7zndeUQmb6mUTO8a+vi9eRi7+CXWs7Fv+6FvBISodYhiuCYqURkLZWpmGd1Vw5FxM +LOA== 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=7zF9X52Z5zEIH3tyffgGEpNE9zCzMNtaHS+mAfwTlHE=; b=LR7UJEWvm1pjHGsAm49pyML/cZcTyIVAfAbUhQWYts7AVxpf4/qwbEr/+BJQaMhhWA Wfq12NyHk7CgZjePoCKBUXG6YSHgZli4L5mcpN4G8tsgUxeiWw0eFlHgwuKfW9BpFsME f16mxen3KApZ2jq201Xc/cpcmxFARUcqPZ0rgJpu1ftERK89rWX9+KjZ9hyxbdn0utoo VaBJROaTQ+Yhlmk74jRIE+smyHCabav/OnP6nTKZlDYJGyCgmUl1aqXtozI7pIHQ4vDZ f35GONtpgPhNkLKV6qjeJDp9pA/A84Q3whKMKt3oj0aLfUOwYLj3MClXyVgMt0dsTDnc ijNQ== X-Gm-Message-State: AOAM533AOeBbYvq1Md3IpHywY4o/b7G3LnUbfSokx8JUYRLv2f2aJvwF e0ssMYyzkCVeaweoSf3oE70iFqTwk4Y= X-Google-Smtp-Source: ABdhPJy+Y20y92YPAaXhW/0kGgwK/J+yXQ8tY9sJJglRNF8pR262DR6A3jHyUgXcALbvv5ejnpvz/w== X-Received: by 2002:a37:2c81:: with SMTP id s123mr1888870qkh.344.1642039109624; Wed, 12 Jan 2022 17:58:29 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id u19sm893081qke.1.2022.01.12.17.58.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 17:58:29 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 22:57:39 -0300 Message-Id: <20220113015806.519-4-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 122/281] pp_bnk: 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/pp_bnk.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavformat/pp_bnk.c b/libavformat/pp_bnk.c index b1e1b6115e..c4172e2260 100644 --- a/libavformat/pp_bnk.c +++ b/libavformat/pp_bnk.c @@ -205,18 +205,12 @@ static int pp_bnk_read_header(AVFormatContext *s) par->codec_id = AV_CODEC_ID_ADPCM_IMA_CUNNING; par->format = AV_SAMPLE_FMT_S16P; - if (ctx->is_music) { - par->channel_layout = AV_CH_LAYOUT_STEREO; - par->channels = 2; - } else { - par->channel_layout = AV_CH_LAYOUT_MONO; - par->channels = 1; - } - + av_channel_layout_default(&par->ch_layout, ctx->is_music + 1); par->sample_rate = hdr.sample_rate; par->bits_per_coded_sample = 4; par->block_align = 1; - par->bit_rate = par->sample_rate * (int64_t)par->bits_per_coded_sample * par->channels; + par->bit_rate = par->sample_rate * (int64_t)par->bits_per_coded_sample * + par->ch_layout.nb_channels; avpriv_set_pts_info(st, 64, 1, par->sample_rate); st->start_time = 0; -- 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".