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 D640D49829 for ; Tue, 20 Feb 2024 02:49:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0395A68D450; Tue, 20 Feb 2024 04:49:33 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 10D3068C248 for ; Tue, 20 Feb 2024 04:49:25 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6DAD4E0003 for ; Tue, 20 Feb 2024 02:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1708397364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=XhDrDt7Xpa4/ApX3i70neE9Wx+S/0koGBQqUohXd534=; b=LrG47/tznNMf63XlEDB1QWt4Bywk8iKTEh9ithYGMEJaNKh6+/Wibgx7qatw5OiZ0y24t2 MbvODQLwier89anIzMR+GyFkA/jf+csQTSuoDax8Xsmz2Ic2otjWofJB5ObPE+WYGKAa9f +ntpH5iUOWxURbXq3tqSi3Lz9JFotvOFDpkol1f5Znh1TiXh59+5SwxUYLxzuUzgvDAxkG wkRtvoNgSROCl/rGRNzHrA//enTlsgOFmfs/idvHCSLu9GCeDeUz6spJKqhVsuZHSFECIw MpLFk0WqgmMw1/56giFLdLcKILjz43pbHPdAbTdiqVspt/pknDZQ/KibgCvHdA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 20 Feb 2024 03:49:22 +0100 Message-Id: <20240220024922.22779-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240220024922.22779-1-michael@niedermayer.cc> References: <20240220024922.22779-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/3] libswscale/utils: Fix bayer to yuvj 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 MIME-Version: 1.0 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: Fixes: out of array access. Earlier code assumes that a unscaled bayer to yuvj420 converter exists but the later code then skips yuvj420 Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index d27128e42f..ab8a68e241 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1728,7 +1728,8 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter, /* unscaled special cases */ if (unscaled && !usesHFilter && !usesVFilter && (c->srcRange == c->dstRange || isAnyRGB(dstFormat) || - isFloat(srcFormat) || isFloat(dstFormat))){ + isFloat(srcFormat) || isFloat(dstFormat) || isBayer(srcFormat))){ + ff_get_unscaled_swscale(c); if (c->convert_unscaled) { -- 2.17.1 _______________________________________________ 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".