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 251F24B68E for ; Tue, 11 Jun 2024 13:44:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E2F9668D845; Tue, 11 Jun 2024 16:44:31 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C40B68D6AE for ; Tue, 11 Jun 2024 16:44:25 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id EB1B8C0009 for ; Tue, 11 Jun 2024 13:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1718113465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AH6QNSHrejX+ZLM2ggQHA6sdBduI1iOabFDNq2RW2Ow=; b=Pt2z7YAzJWCLjq3kLoXHEFY2ttOjAWIk17f+7KFmj4B2WbYY2+dfFB7v20Zi4c0sjzu4AF 7uWBHISDMMTEPGY8Pq7/CDtw82RX++K3CILguOluyYiItxPuXRTzt7BO51ges4+iGv+c3x l/d14q5YAduRAs7IWXb12kvFNClFylIMNAvmvugTCXMyRFRCcmHNdkiRLRDDaUkZsvStez zh/Edz0wVMmRDmWG+KizfXIT5ls3HobzSM2eZYE1AqRfc7EA8EXSDQG97ySGYjJymWYDJ6 +bxqtIVaGr8rU4STlEy+rJxLs/VbZrWD73w4KsO4qLAriXlaobKLIfKJJGGGPw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 11 Jun 2024 15:44:20 +0200 Message-ID: <20240611134422.3172010-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240611134422.3172010-1-michael@niedermayer.cc> References: <20240611134422.3172010-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/4] avfilter/af_channelsplit: Assert that av_channel_layout_channel_from_index() succeeds 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: Maybe Helps: CID1503077 Bad bit shift operation Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/af_channelsplit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c index 1c4e815c6ef..43b26677505 100644 --- a/libavfilter/af_channelsplit.c +++ b/libavfilter/af_channelsplit.c @@ -22,7 +22,7 @@ * * Split an audio stream into per-channel streams. */ - +#include "libavutil/avassert.h" #include "libavutil/attributes.h" #include "libavutil/channel_layout.h" #include "libavutil/internal.h" @@ -157,6 +157,8 @@ static int filter_frame(AVFilterLink *outlink, AVFrame *buf) enum AVChannel channel = av_channel_layout_channel_from_index(&buf->ch_layout, s->map[i]); int ret; + av_assert1(channel >= 0); + AVFrame *buf_out = av_frame_clone(buf); if (!buf_out) return AVERROR(ENOMEM); -- 2.45.2 _______________________________________________ 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".