From patchwork Mon May 31 07:54:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 28015 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2656106iof; Mon, 31 May 2021 00:55:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxt6Y3u/xENAQQGj4Pz+tzYSh5JxL2p1bkNrJN2QSfHBrm7SxJhrrdDTeEupyNaMhjSKxm8 X-Received: by 2002:a17:906:1815:: with SMTP id v21mr21539452eje.376.1622447755531; Mon, 31 May 2021 00:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622447755; cv=none; d=google.com; s=arc-20160816; b=xyw4zeIfo/XxpQFJdeW8xmulDFkgPO7FDQc2jA6MEofJXiQr38RNawEmfgK4qnWaOx 4hn4gyyZ38gpMvHFC7xUdTw57mUqlc116k/noRIUNclam3YR30iUaYVOZG6u1hGKAYQq 97yTv9ciEhKiGMxdW0gP9wfqlV3+uBa93KrxL8Xy59QPw1DXchjPfh1Qg04e4TS+cpbX J4ezYWGC18dvC69J2WTKxqVTABIQ5KhJSFmheTfCn1lvDdcSMmf388RBtCTgJD5wn+1U L4DXmhUlTo/jaU3Un+hR2H1x7JQbq4NX+Sveog3j091tYbFRlJ6rTeO2imamiAhffZxr enhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=qCVHp2/VhxaceM1pTOCHfprO5b43tLoWnDsMwDnFSCo=; b=D/ccRd3aEQlynnbLyOOE8K6Ic6gVKpZgJDSSWwonkLhGCv5V7W8oOULQDlHXCNjlQ7 cusLfKDQEecBf7MYGftgEXxtN76au7FyyrbWOyNy9bAYvLIqraXJzMotgDQUqyzomasT NqdJo4t2/vk3PjOy22g3xaeqag1bcwN8umvgus4b7QlZR7uThsBbZm7aL+FVUJBqhdir ZgWZL1bhi53FrSnfFiFHJ3OlpizgT9pWmyPT0piC31brzexARpnxN+mt60n3USAwotSi glKmWKtx5siipn4YKJHnPuAlzmZE1WXfmscxFV7Sr3xc7/oyjmyvrR4Dusio2lBDZPhJ D7mA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o15si7259529eju.373.2021.05.31.00.55.55; Mon, 31 May 2021 00:55:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E28936882FD; Mon, 31 May 2021 10:55:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 494C56808F5 for ; Mon, 31 May 2021 10:55:23 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 9DAA52406A6 for ; Mon, 31 May 2021 09:55:22 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id y0BYoLARD7pM for ; Mon, 31 May 2021 09:55:22 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 841C724068A for ; Mon, 31 May 2021 09:55:21 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id DD6D33A13C3; Mon, 31 May 2021 09:55:20 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 May 2021 09:54:55 +0200 Message-Id: <20210531075515.19544-4-anton@khirnov.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210531075515.19544-1-anton@khirnov.net> References: <20210531075515.19544-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/24] sws: return an error code on invalid parameters to sws_scale() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Mf0L+kiy/aQy --- libswscale/swscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 05e716dcc9..9743c56295 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -833,7 +833,7 @@ int attribute_align_arg sws_scale(struct SwsContext *c, if (!srcStride || !dstStride || !dst || !srcSlice) { av_log(c, AV_LOG_ERROR, "One of the input parameters to sws_scale() is NULL, please check the calling code\n"); - return 0; + return AVERROR(EINVAL); } for (i=0; i<4; i++) {