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 60AED48C23 for ; Sat, 23 Mar 2024 11:18:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A6D5468D439; Sat, 23 Mar 2024 13:18:37 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B6B4768D198 for ; Sat, 23 Mar 2024 13:18:30 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 9AF4AEA1EE for ; Sat, 23 Mar 2024 12:18:30 +0100 (CET) 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 xxSYQNmStn0j for ; Sat, 23 Mar 2024 12:18:29 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id D6E40E9A30 for ; Sat, 23 Mar 2024 12:18:28 +0100 (CET) Date: Sat, 23 Mar 2024 12:18:28 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20240319211504.8342-1-cus@passwd.hu> Message-ID: <9375d672-2d9b-5244-2c50-1098f8146b99@passwd.hu> References: <20240319211504.8342-1-cus@passwd.hu> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/6] avfilter/af_channelmap: fix error message if FL source channel was missing 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 Tue, 19 Mar 2024, Marton Balint wrote: > FL channel ID is 0, so for an unset value we must check for ID < 0. > > Regression since 1f96db959c1235bb7079d354e09914a0a2608f62. Will apply the series soon. Regards, Marton > > Signed-off-by: Marton Balint > --- > libavfilter/af_channelmap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c > index 5e1cf57680..d13dcc317d 100644 > --- a/libavfilter/af_channelmap.c > +++ b/libavfilter/af_channelmap.c > @@ -165,7 +165,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx) > > for (i = 0; i < map_entries; i++) { > int in_ch_idx = -1, out_ch_idx = -1; > - int in_ch = 0, out_ch = 0; > + int in_ch = -1, out_ch = -1; > static const char err[] = "Failed to parse channel map\n"; > switch (mode) { > case MAP_ONE_INT: > @@ -349,7 +349,7 @@ static int channelmap_config_input(AVFilterLink *inlink) > > if (m->in_channel_idx < 0 || m->in_channel_idx >= nb_channels) { > av_channel_layout_describe(&inlink->ch_layout, layout_name, sizeof(layout_name)); > - if (m->in_channel) { > + if (m->in_channel >= 0) { > av_channel_name(channel_name, sizeof(channel_name), m->in_channel); > av_log(ctx, AV_LOG_ERROR, > "input channel '%s' not available from input layout '%s'\n", > -- > 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".