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 5BC6649D29 for ; Thu, 9 May 2024 02:30:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 05D8268D71E; Thu, 9 May 2024 05:30:33 +0300 (EEST) Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC9B168D6C6 for ; Thu, 9 May 2024 05:30:26 +0300 (EEST) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-23d477a1a4fso299275fac.3 for ; Wed, 08 May 2024 19:30:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715221824; x=1715826624; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=tVCEujseDU3a8dE2lTZ+fZG03+d4z3elTZ76LrLZAi4=; b=GIO4B6wFmwPToojcexcyqKIv4ls+557ctd92bcN6tqpNpxM7gMiaeyIwJ6MLvaHZmm eyt7v/m/vtEJ3yt+bTBLwfZtfLz7P9RNGu4pvDHKno3UQ10BITs2Lo3k9aEURgwTfkXr 6HWWaIEOYEMFsHvZJHGkLeSjBetx5koH9aLvUkiZm/sQgIWbbdxT936uNtE7I/mXt7hv XnYffEuzrUhqqoOpilmVF4WwNQw6/RVp8fybmaGz/lxgeV0w/vu+1pQKchO8vt/9k0ux fUS3LRzK4o4R4VmxkyaRkVV9I4AxmjpWtofSnRMiRTMbgmIeMbL3mLl85azvw839iAUa QEqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715221824; x=1715826624; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tVCEujseDU3a8dE2lTZ+fZG03+d4z3elTZ76LrLZAi4=; b=gwG7X937QUFh+edun507HlyyOSUJEgoBzo4bBxzxuN2De1c+YiyTSBWdaZLzlOkBLI Hkb4yJrVZzS3C61mxDk1wKQ3Jg3CRRlprM8IQy5ZZ+/kkSIqng88e9uhcVLyyrg5SUvj PkhpdWnhnGxMMjjPjzkK4feIjleS0hT5ipwhLp2P8+EpmUkbug92c6prfiKDFGG5be5T NWYKoJfsLRm0hO3MIF8KXv62jCBi4jra9JKn7SQ3eodtV5Xv3ir/auc5rhWEfZEdynpM EFhDNzAKKtgEXkOcCmtZH+0wkTfFMIZUihSo1PMxZKmaSYr+gzuYJYXT9i/IL7p5sNIR Nhmg== X-Gm-Message-State: AOJu0YzHn8ybOd8K7kLKzU00ualR6CE2HK/DygsiBq9/XR3q4cABP9m5 JQssr81y+YYVmWAUbo+sEvKZ5LnRxihX8oxtLi4BKntssDjx9c+ifSHYcw== X-Google-Smtp-Source: AGHT+IE0dmY/tvugO2vT9Ssp8ULvW9vhOGFQ4dcnJD1uUS+Mtu12J75ngBjPjFLVc2TFp8UTjQEd7w== X-Received: by 2002:a05:6870:f718:b0:22e:bcfd:debc with SMTP id 586e51a60fabf-240981f556fmr5535506fac.13.1715221824236; Wed, 08 May 2024 19:30:24 -0700 (PDT) Received: from [192.168.0.10] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a84b76sm255227b3a.68.2024.05.08.19.30.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 May 2024 19:30:23 -0700 (PDT) Message-ID: Date: Wed, 8 May 2024 23:30:26 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20240509022818.132382-1-hiccupzhu@gmail.com> Content-Language: en-US From: James Almer In-Reply-To: <20240509022818.132382-1-hiccupzhu@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] avformat/riffdec: add 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 5/8/2024 11:28 PM, shiqizhu wrote: > Signed-off-by: shiqizhu > --- > libavformat/riffdec.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c > index b7a85a6ab2..89267e879d 100644 > --- a/libavformat/riffdec.c > +++ b/libavformat/riffdec.c > @@ -197,8 +197,7 @@ int ff_get_wav_header(void *logctx, AVIOContext *pb, > /* ignore WAVEFORMATEXTENSIBLE layout if different from channel count */ > if (channels != par->ch_layout.nb_channels) { > av_channel_layout_uninit(&par->ch_layout); > - par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; > - par->ch_layout.nb_channels = channels; > + av_channel_layout_default(&par->ch_layout, channels); No, guessing is left to the caller. lavf should export what's signaled in the file. _______________________________________________ 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".