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 AC84E45DA5 for ; Sat, 6 Apr 2024 09:14:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9FF4068D083; Sat, 6 Apr 2024 12:14:20 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 571A168CBED for ; Sat, 6 Apr 2024 12:14:14 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 2A233EA3C8 for ; Sat, 6 Apr 2024 11:14:14 +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 DiErcVlrkiiy for ; Sat, 6 Apr 2024 11:14:12 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id BA152E99D8 for ; Sat, 6 Apr 2024 11:14:11 +0200 (CEST) Date: Sat, 6 Apr 2024 11:14:11 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20240331183655.4592-1-cus@passwd.hu> Message-ID: <0385ab67-6061-26f9-da50-f969579b6669@passwd.hu> References: <20240331183655.4592-1-cus@passwd.hu> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: never override channel count in av_buffersrc_add_frame_flags 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 Sun, 31 Mar 2024, Marton Balint wrote: > Overriding unknown layouts with the negotiated layout is OK, but the number of > channels should match with what was negotiated. Will apply. Regards, Marton > > Signed-off-by: Marton Balint > --- > libavfilter/buffersrc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c > index 130751775a..3ea3ca92c9 100644 > --- a/libavfilter/buffersrc.c > +++ b/libavfilter/buffersrc.c > @@ -215,7 +215,7 @@ int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFra > break; > case AVMEDIA_TYPE_AUDIO: > /* For layouts unknown on input but known on link after negotiation. */ > - if (frame->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) { > + if (frame->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC && frame->ch_layout.nb_channels == s->ch_layout.nb_channels) { > ret = av_channel_layout_copy(&frame->ch_layout, &s->ch_layout); > if (ret < 0) > return ret; > -- > 2.35.3 > > _______________________________________________ > 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". > _______________________________________________ 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".