From patchwork Mon Feb 27 02:18:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 2690 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.149 with SMTP id x21csp808206vsf; Sun, 26 Feb 2017 18:19:00 -0800 (PST) X-Received: by 10.28.109.70 with SMTP id i67mr10907180wmc.102.1488161940278; Sun, 26 Feb 2017 18:19:00 -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 d17si16495386wrb.215.2017.02.26.18.18.59; Sun, 26 Feb 2017 18:19:00 -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 6E9136882D1; Mon, 27 Feb 2017 04:18:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f175.google.com (mail-pf0-f175.google.com [209.85.192.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF4406804F5 for ; Mon, 27 Feb 2017 04:18:38 +0200 (EET) Received: by mail-pf0-f175.google.com with SMTP id 89so1850942pfi.3 for ; Sun, 26 Feb 2017 18:18:48 -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=HY6GDE/Rih/zEDCETcD6K5meKzgFKDYIbmB/t4l3tZM=; b=s7bmPsAwjeetxmxMk/LPAc0ZyqLj0Y+hcIqYvZUfk5npBUjHCLyzU0ZH8RGiuzA8qB sDxKm2pfysjNbmjjqWmzh6j5MCk+fhYWE7ua3Z0tMuWNIXcTOFfCeHnLd0otPGcYkd9R CpslOrw83sCbw8+ko5P0gXTQOMXnu6Z9W/9G5mWMmsrknuHLBJ0y0D7i6V7tIsbZBoQl 3KI4a7KQcsJy1wqAaqG2W9YQMaQI7SbHSIRBFisHIOdEsKKGtQJ+OI7BNdfFpyVwndKE FMuZLwqiTbpX6SCR0MwYyZ7hXPE2E59xsFaQmkkuU4akro9syzm5yIXo12uhEHqPFgiJ t2Pw== 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=HY6GDE/Rih/zEDCETcD6K5meKzgFKDYIbmB/t4l3tZM=; b=mb3Z6fdsn0bdBtVTVbjHeuHD0iUwCHQur/z9elvw9uN3xrGcnhKC8v7uMiELa9Vg5C FeF2Lr5kGeakaBgJhmikfRoQ5rmuLQWIG124OVsgHTN5DezHfV0xYUCaLQHx+r+5kICq 57yOD8mv/NANwqbOy11PQ2IULOKjcK09+qjHN9IKlJCMOZ0iw/BDUB2VFUn4RlZdTS+E XGZk8P+zksTOAOaWdX6iLogg+gXSApNwkLvynEazTFluQNQIFpNi0TDIuf46gK8KHpcb BMO4ZLyZymjNyCor+tBSajWI2fOypLrTIoDeEJmk2S7uSHQ8Mmr5QpMl0QwtTM/IxMKT AoGw== X-Gm-Message-State: AMke39mXDYtKCKPvigOiYNQfBynI7Swl87J0XTQrqJ7UZaVxJCxr02ufFBXkuFe04hSbfg== X-Received: by 10.99.122.71 with SMTP id j7mr4747261pgn.52.1488161926702; Sun, 26 Feb 2017 18:18:46 -0800 (PST) Received: from [10.239.204.195] (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id m6sm26690382pfm.22.2017.02.26.18.18.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Feb 2017 18:18:45 -0800 (PST) To: Mark Thompson , FFmpeg development discussions and patches From: Jun Zhao Message-ID: <740c7871-4919-706b-7b41-d3d2ea645e39@gmail.com> Date: Mon, 27 Feb 2017 10:18:43 +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 checks 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;