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 08DA542733 for ; Fri, 29 Apr 2022 10:45:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 97F1E68B298; Fri, 29 Apr 2022 13:45:27 +0300 (EEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EC05868B1BB for ; Fri, 29 Apr 2022 13:45:20 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651229126; x=1682765126; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3+E3893/sNEwsEglkpLG7l7ge7lL/7AJFqcoDgZFvYY=; b=AafAwWUl5sYag8/OAEVidvwTai5NL1YrpF2HvR14kzMcTuh9UG0zB0vN 661CaH0r2inaY7SsRcke2GU8bwaRUiSUH6RdKvxrXuQqZplXayuwu37cT 7oyRitDc2FFHZKZ1caoOeaMIBM8cHsCrY7UMMpr67ZeQUxeWGqop+Mn0Z VxJ/N/dwT8SHHEsivUN0PjdPCm0qPW1pXuKPWlrJWYRQV86ZcxZwvZEb6 uqiYoakE8Saw4IhUgB4t9G5D2KY3x4fX5zevSs7REXLj8+esCB4lz0Qkj o+/ut91GCwLz8kMhwAToLY08CdSLh2R7LPyt4tGLzrCRoRwoO46x1Rf/7 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10331"; a="329548320" X-IronPort-AV: E=Sophos;i="5.91,298,1647327600"; d="scan'208";a="329548320" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 03:45:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,298,1647327600"; d="scan'208";a="566080472" Received: from gtapc.iind.intel.com (HELO localhost.localdomain) ([10.190.235.42]) by fmsmga007.fm.intel.com with ESMTP; 29 Apr 2022 03:45:16 -0700 From: Tong Wu To: ffmpeg-devel@ffmpeg.org Date: Fri, 29 Apr 2022 10:45:01 +0000 Message-Id: <20220429104505.1747-1-tong1.wu@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/5] 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. Fixes: $ ffmpeg.exe -init_hw_device d3d11va=d3d11 -f lavfi -i yuvtestsrc -vf \ "format=nv12,hwupload=extra_hw_frames=16" -f null - 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 8ab96bad25..db529acbb4 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 _______________________________________________ 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".