From patchwork Thu Aug 5 08:19:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 29275 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp192140ioh; Thu, 5 Aug 2021 01:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf2N2minfxDzKmv7V5feJ1hsEr8IGMQylZnw8Wc50woCe3HagKndkCq5JXOq/5RH81Gh3G X-Received: by 2002:a05:6402:d68:: with SMTP id ec40mr5080584edb.344.1628151895170; Thu, 05 Aug 2021 01:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628151895; cv=none; d=google.com; s=arc-20160816; b=NawD5eeJjoluaX+cbxIDZk01MclFu15c/srLrFZPIIuJbgvsHtq2/WhS0LMUDmA1or BkSTrncsfvKT0/lCssnRZMLAnFd379hijjZuAztS+LWWr2a2z9WDmo6ahqPSBT+OhqfZ tcXZsWczleJ+HrzBxAZkrAJLvwgujIDsa0PM67yoeZ1u0XTgV+awn6KWSLit7fr4XG0v /BkWHZP6Q1w3Jc0q23R9WdbzGG0ORZmrafmCaA4BQMVAPO+wdg0SXNQzLdlQMYHbfw+O TcYUlrdCvcVhM5C1sy//cIzksu90mGYPYtjCAGPbaVKuDdVouMOlpvZmPyyH4xbMZVO+ XNvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=t0FIrAhXF4t42eAbRExsLpmeY6F0hN1TgBpfWB7i5TE=; b=q/3qlpEG1tS9bR65vzkpAIykMlrBpqe1RoZ47XJ8iBB/k6BfYthFMOkEB8Upxnsyg2 dvX0udgQQyNJfhumyeL48wHIKjkdiKzivG/pVQWSNHB6YVlgdUnQQc5qBhmjY+u1LPCV MZ59TLNH2p+cqk7i3m3JPdT7yYquxlDpkdjyMjFDn3X73mXCC2oR7QcXHavP8acpdzP0 q+krkpgpvIg3kFyWJ6z+cwJu1l0NTb/7hkUcOIgIbsFePqCgXU39VMjwMmd9i8mMbiIV +ziLvE2AbxZO2Wv/vnRVDlsKpBm0wpAbsJbXlYb+PyQf+nHeWx2evW5Qhxpfi+VBiaQo 1IPw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e24si4902627edr.66.2021.08.05.01.24.54; Thu, 05 Aug 2021 01:24: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC53468A5D1; Thu, 5 Aug 2021 11:21:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A5F468A4DF for ; Thu, 5 Aug 2021 11:21:32 +0300 (EEST) X-IronPort-AV: E=McAfee;i="6200,9189,10066"; a="236062063" X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="236062063" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2021 01:19:56 -0700 X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="522442434" Received: from xhh-dg164.sh.intel.com ([10.239.159.167]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2021 01:19:55 -0700 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Thu, 5 Aug 2021 16:19:06 +0800 Message-Id: <20210805081910.9386-17-haihao.xiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210805081910.9386-1-haihao.xiang@intel.com> References: <20210805081910.9386-1-haihao.xiang@intel.com> Subject: [FFmpeg-devel] [PATCH v5 16/20] lavfi/vpp_qsv: check output format string against NULL pointer 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 Cc: Haihao Xiang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mI8lROIkBDMi This is in preparation for re-using VPPContext but with a different option array for deinterlacing_qsv filter --- libavfilter/vf_vpp_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 3eddefea31..f7854f81bf 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -234,7 +234,7 @@ static av_cold int vpp_init(AVFilterContext *ctx) { VPPContext *vpp = ctx->priv; - if (!strcmp(vpp->output_format_str, "same")) { + if (!vpp->output_format_str || !strcmp(vpp->output_format_str, "same")) { vpp->out_format = AV_PIX_FMT_NONE; } else { vpp->out_format = av_get_pix_fmt(vpp->output_format_str);