From patchwork Mon Feb 27 02:23:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 2691 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.149 with SMTP id x21csp810977vsf; Sun, 26 Feb 2017 18:31:25 -0800 (PST) X-Received: by 10.223.154.44 with SMTP id z41mr9486449wrb.188.1488162685339; Sun, 26 Feb 2017 18:31:25 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k12si19635381wrc.141.2017.02.26.18.31.21; Sun, 26 Feb 2017 18:31:25 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@gmail.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8B3506882EC; Mon, 27 Feb 2017 04:31:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9D65A6882B9 for ; Mon, 27 Feb 2017 04:31:02 +0200 (EET) Received: by mail-pf0-f173.google.com with SMTP id 89so1930505pfi.3 for ; Sun, 26 Feb 2017 18:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version; bh=zui2x4IH8PkLS4ATViWidHaEgbWhX+wG2suWcLIQtpA=; b=XfNHnTpUKzMjc64yTGQHJuWuGlImr/ODPm/v36ny9VQI2w4gFJIq6Jf78/455FBrXm rqWbmsc9wsUN4ds8IPTMFAjcSp+PdkuDqYSP4JkY0xeCrhtC0HSr9Cy6uR2XQ3Yh/ye9 T9GFoEtuqpPPi5Jw8Nqwvris3Xh3gQk06sjPDHk43Nd1Va5kwSsh0NCcba9wk0PFC1gu Xl9ZLXTL4vXt7k1702SV/dE/dM4nehnm0LP0EMkQ+t7lpQDZF7wW+hG0YreFGWCLVQHJ u2H6KwZx7hmQbeE5UCjrSoawHZ69iTXHwAAfbdm5HL90Duv3mTcaJB+hSxsOxTVqN56O jHqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=zui2x4IH8PkLS4ATViWidHaEgbWhX+wG2suWcLIQtpA=; b=gTUmXFL+eCR151c6a/0o2THY/1LhjK/urvXiokoBppcnKKIBfR5bNDzzuxi6127xZ7 jP1m/ONiCmA49sj4ypCh9W8kl1UIMo1VxRxJyPnptMv6+u9x3sK1XsYjHv9n9qlpxbvo SalnJRrCD4zRoWcgugviyE2r6dAQ77GN1rZhmEGBOfs4Tmz3NlphNbikd0OAhFtyt6Vm mn0p/V3UfuONnR69lPZ6Z6j7FKuYrEZaHpVeZeJB/JXLA+HB5VxNIEemLMC42iQZPVJ8 SizG3+M5SWCtu0IMl6g0sMeQUS4IHh5Z2W6G32TwJKPOnSLSbBh+3Rwj0M/AwTSotBgJ m7/w== X-Gm-Message-State: AMke39l59teS4HWIGZxZu8BfO/YrHnaypPrNhNzWkFolMi7lEH92L8cwU7tNVRs1PiUqrw== X-Received: by 10.99.37.135 with SMTP id l129mr18022110pgl.206.1488162233515; Sun, 26 Feb 2017 18:23:53 -0800 (PST) Received: from [10.239.204.195] (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id g194sm26754657pfb.19.2017.02.26.18.23.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Feb 2017 18:23:52 -0800 (PST) To: Mark Thompson , FFmpeg development discussions and patches From: Jun Zhao Message-ID: <16f4f471-c021-bfe9-e336-ee1f6e72dc73@gmail.com> Date: Mon, 27 Feb 2017 10:23:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 Content-Disposition: attachment; filename="0001-vf_hwupload-Add-missing-return-value-checks.patch" X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] vf_hwupload: Add missing return value check X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" From e60a958c78ba084e0745acebec5125394387c5b1 Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Mon, 27 Feb 2017 10:08:36 +0800 Subject: [PATCH] vf_hwupload: Add missing return value checks Add missing return value checks to fix the build warning. Signed-off-by: Jun Zhao --- libavfilter/vf_hwupload.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c index 08af2dd..ce39307 100644 --- a/libavfilter/vf_hwupload.c +++ b/libavfilter/vf_hwupload.c @@ -81,10 +81,12 @@ static int hwupload_query_formats(AVFilterContext *avctx) } } - ff_formats_ref(input_formats, &avctx->inputs[0]->out_formats); - - ff_formats_ref(ff_make_format_list(output_pix_fmts), - &avctx->outputs[0]->in_formats); + if ((err = ff_formats_ref(input_formats, &avctx->inputs[0]->out_formats)) < 0 || + (err = ff_formats_ref(ff_make_format_list(output_pix_fmts), + &avctx->outputs[0]->in_formats)) < 0) { + ff_formats_unref(&input_formats); + goto fail; + } av_hwframe_constraints_free(&constraints); return 0;