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 68A094112B for ; Wed, 8 May 2024 19:41:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 03CAA68D5D8; Wed, 8 May 2024 22:41:33 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E98C868D5D8 for ; Wed, 8 May 2024 22:41:25 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 4307BEA5CE for ; Wed, 8 May 2024 21:41:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZIWAACzpuZAt for ; Wed, 8 May 2024 21:41:23 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 46B4DEA5A0 for ; Wed, 8 May 2024 21:41:23 +0200 (CEST) Date: Wed, 8 May 2024 21:41:23 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20240508092453.97376-1-hiccupzhu@gmail.com> Message-ID: References: <20240508092453.97376-1-hiccupzhu@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avformat/wavdec: change ch_layout used av_channel_layout_default. 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 8 May 2024, shiqizhu wrote: > Signed-off-by: shiqizhu > --- > libavformat/wavdec.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c > index 00856a5eca..9060796c81 100644 > --- a/libavformat/wavdec.c > +++ b/libavformat/wavdec.c > @@ -233,8 +233,7 @@ static int wav_parse_xma2_tag(AVFormatContext *s, int64_t size, AVStream *st) > avio_skip(pb, 3); > } > av_channel_layout_uninit(&st->codecpar->ch_layout); > - st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; > - st->codecpar->ch_layout.nb_channels = channels; > + av_channel_layout_default(&st->codecpar->ch_layout, channels); Why do you assume that the default layout is suitable here? A demuxer should not guess the channel layout, if the format does not provide any information about it. Regards, Marton _______________________________________________ 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".