From patchwork Sat Jun 1 04:58:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 13366 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id F0DBF449601 for ; Sat, 1 Jun 2019 07:58:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DBD0068AAA2; Sat, 1 Jun 2019 07:58:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 84DA368AA82 for ; Sat, 1 Jun 2019 07:58:39 +0300 (EEST) Received: by mail-pl1-f193.google.com with SMTP id e5so3059766pls.13 for ; Fri, 31 May 2019 21:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2Q2j3/svk2M7JY0pav9rCBjoMbvMcbPR51AJcxgv+B0=; b=gBHkKtpx0bJkNXbzRUL00JtGXCztf68fCYJJUBY9/p/390eSb2vLd+kY5hQeSe5Kfj mlefqSn051BWmVTXLYuKCVMvuNyd3Xy522G3+gy+oOatBZAVEIHQOCKMmfSmF2uOjKMl 6TiD8G/hHYswcYY+8ojyCj2CmLxYdQcJbSACMjCtv+XjYSGkbMOfxHpeFVozMnaWyT56 iHaywj/pkPRK6fRQrURtnCoxOcyJvR/vQHwTQcbaN2pEUoJ80nY5KIR5dYW3ZVwl5RwU I6p7vylCQE9neoDIvprfsA5IwlkGlJ9Tyb8HlMOOc0Jpy/zxqNOM40rydapFJ30YFDp7 3YFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2Q2j3/svk2M7JY0pav9rCBjoMbvMcbPR51AJcxgv+B0=; b=Rzwowq9k3HYxQBLz+9cJJipgxgDjIbJ/QVmiTEBmqz5YUZAq2INoRZM13yyh39wKF3 myMwpXj6b/jYix3IOf8r1a+U/i1Wu1u7uvey+8YL/Sxoaz+5y7E14E4IQxFkSuQht1jq FSwibeWMlLvfMCyPcecAY3oTl7mZCRWB1cqoCiGxjxy+ZPsJmeUCu4cmiq7vx6rC+n+X 6nGL+1Z04W76TWj8zJvtGOGRzOoqxsz8gC0hNUc743N3OzFQOLJJy/0NRJUyKLICxG15 EkOLKHwS3I8RVAZNrumnM1ThBog6hlMdiXDElqSpdLYZu6t/FlzCx/3QWL5Vd5dNvwBS F59w== X-Gm-Message-State: APjAAAX9bcJoOFUgPdiQj/Lcwatn1VvYqQHea4eD7Lfrt18GWTMVm53E WUxqZWUz3Usns74nssJW1lYBN056 X-Google-Smtp-Source: APXvYqytn0oqIXI7zuaVgi2Y6hq+Ggg6riIxLBZZJNhyeEfQwX8gjk8K0Om+8TZORPGAvvCMUoCWwg== X-Received: by 2002:a17:902:b590:: with SMTP id a16mr13934969pls.168.1559365117320; Fri, 31 May 2019 21:58:37 -0700 (PDT) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id o6sm7696822pfo.164.2019.05.31.21.58.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 21:58:36 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Jun 2019 12:58:25 +0800 Message-Id: <1559365106-9734-3-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1559365106-9734-1-git-send-email-mypopydev@gmail.com> References: <1559365106-9734-1-git-send-email-mypopydev@gmail.com> Subject: [FFmpeg-devel] [PATCH V1 2/3] lavf/sr: Don't need to check NULL before sws_freeContext 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 Cc: Jun Zhao MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jun Zhao sws_freeContext have check the NULL pointer, so don't need to check NULL before sws_freeContext. Signed-off-by: Jun Zhao --- libavfilter/vf_sr.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index a371e44..0be572f 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -286,9 +286,7 @@ static av_cold void uninit(AVFilterContext *context) } for (i = 0; i < 3; ++i){ - if (sr_context->sws_contexts[i]){ - sws_freeContext(sr_context->sws_contexts[i]); - } + sws_freeContext(sr_context->sws_contexts[i]); } }