From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 03DC3422B5 for ; Fri, 1 Apr 2022 09:25:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4012068B256; Fri, 1 Apr 2022 12:25:21 +0300 (EEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02A3868B1FB for ; Fri, 1 Apr 2022 12:25:13 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648805119; x=1680341119; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y6ynxT6GUgbYYzqFDK6tfemPWko2HFzRRfOypMa3S2A=; b=LUO+0SCWcKfWH1+PBTkfJKqUsYX8DII76Y3tCcKV2m/LyPb0yntsx6kG YurygEG3zbB2tyXuxJfBLaM6rW8Rhax7Psnlovcy80YB9unH64Wt6nmh5 NveZMpcj/YW1yvl9iqlCfqnE1i/8YJmYnaV5aPYKkusUfpaI5DS1Wga66 SxfVqEnrcG9OjR9BkTmZlUEIIkL60TlQA4ditPBNMkmR4jJjFZ/H9ruTR G9JjBsc+ua74GXkrJPPilBCDgNL1RTSv5aX21L8FJR405Y/R6CaQJVqVl T79BSR3e/U2E/T86dHZ//YpxkU1tsC9/QHht41KO/6B/014+IzD8PcClg g==; X-IronPort-AV: E=McAfee;i="6200,9189,10303"; a="323261244" X-IronPort-AV: E=Sophos;i="5.90,226,1643702400"; d="scan'208";a="323261244" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2022 02:25:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,226,1643702400"; d="scan'208";a="567328782" Received: from desktop-qn7n0nf.sh.intel.com (HELO localhost.localdomain) ([10.239.160.39]) by orsmga008.jf.intel.com with ESMTP; 01 Apr 2022 02:25:11 -0700 From: Tong Wu To: ffmpeg-devel@ffmpeg.org Date: Fri, 1 Apr 2022 17:24:15 +0800 Message-Id: <20220401092416.1018-2-tong1.wu@intel.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20220401092416.1018-1-tong1.wu@intel.com> References: <20220401092416.1018-1-tong1.wu@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avutil/hwcontext_d3d11va: fix the uninitialized texture bindflag 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: Tong Wu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: When uploading rawvideos using d3d11va hardware framecontext, the bindflag is not initialized and will cause creating texture failure. Now fix it, assign it the value of D3D11_BIND_RENDER_TARGET. Signed-off-by: Tong Wu --- libavutil/hwcontext_d3d11va.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index f69fb3fc9c..0ec0e07d3a 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -254,6 +254,11 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx) return AVERROR(EINVAL); } + if (!hwctx->BindFlags) { + av_log(ctx, AV_LOG_DEBUG, "Add render target bindflag for texture\n"); + hwctx->BindFlags = D3D11_BIND_RENDER_TARGET; + } + texDesc = (D3D11_TEXTURE2D_DESC){ .Width = ctx->width, .Height = ctx->height, -- 2.35.1.windows.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".