Skip to content

Commit

Permalink
Use the correct Vulkan NULL type
Browse files Browse the repository at this point in the history
  • Loading branch information
nihil-admirari committed Sep 22, 2024
1 parent a478df5 commit 55e12b2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ See [this comment](https:/yt-dlp/yt-dlp/pull/5823#issuecomment-13668

Fixes [yt-dlp#5874](https:/yt-dlp/yt-dlp/issues/5874), [FFmpeg#6389](https://trac.ffmpeg.org/ticket/6389).

### 2. [Use the correct Vulkan NULL type](https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2024-September/333751.html)

by [@nihil-admirari](https:/nihil-admirari).

Makes it possible to build the current `master` for Win32 targets.



<!--
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 05d25d766dbb5a8f93ecf3ab95e04cabdc658466 Mon Sep 17 00:00:00 2001
From: nihil-admirari <[email protected]>
Date: Sun, 22 Sep 2024 21:18:28 +0300
Subject: [PATCH] avcodec/vulkan_encode: Use the correct Vulkan NULL type

Fixes build issue for Win32 targets
---
libavcodec/vulkan_encode_h264.c | 2 +-
libavcodec/vulkan_encode_h265.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vulkan_encode_h264.c b/libavcodec/vulkan_encode_h264.c
index af229af..a67e177 100644
--- a/libavcodec/vulkan_encode_h264.c
+++ b/libavcodec/vulkan_encode_h264.c
@@ -1048,7 +1048,7 @@ static int create_session_params(AVCodecContext *avctx)
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
.pNext = &h264_params,
.videoSession = ctx->common.session,
- .videoSessionParametersTemplate = NULL,
+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
};

/* Create session parameters */
diff --git a/libavcodec/vulkan_encode_h265.c b/libavcodec/vulkan_encode_h265.c
index 3cb7a3b..2082cec 100644
--- a/libavcodec/vulkan_encode_h265.c
+++ b/libavcodec/vulkan_encode_h265.c
@@ -1201,7 +1201,7 @@ static int create_session_params(AVCodecContext *avctx)
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
.pNext = &h265_params,
.videoSession = ctx->common.session,
- .videoSessionParametersTemplate = NULL,
+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
};

/* Create session parameters */
--
2.43.0

0 comments on commit 55e12b2

Please sign in to comment.