From 98506112d0d4c54d757f168eb0287270408dabb7 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Thu, 9 Feb 2023 21:18:09 +0300
Subject: [PATCH 12/12] Add patch from ffmpeg 5.1 branch, hopefully fix build
 with new vulkan headers

---
 .../thirdparty/src/ffmpeg-5.1.patchE          | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE

diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE b/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE
new file mode 100644
index 00000000..444ab3af
--- /dev/null
+++ b/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE
@@ -0,0 +1,34 @@
+From: Lynne <dev@lynne.ee>
+Date: Sun, 25 Dec 2022 00:03:30 +0000 (+0100)
+Subject: hwcontext_vulkan: remove optional encode/decode extensions from the list
+X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/7268323193d55365f914de39fadd5dbdb1f68976?hp=30d432f205538f6ef6c86ed0a90e27cdd735cd2b
+
+hwcontext_vulkan: remove optional encode/decode extensions from the list
+
+They're not currently used, so they don't need to be there.
+Vulkan stabilized the decode extensions less than a week ago, and their
+name prefixes were changed from EXT to KHR. It's a bit too soon to be
+depending on it, so rather than bumping, just remove these for now.
+
+(cherry picked from commit eb0455d64690eed0068e5cb202f72ecdf899837c)
+---
+
+diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
+index 237caa4bc0..3bc0dc8a40 100644
+--- a/libavutil/hwcontext_vulkan.c
++++ b/libavutil/hwcontext_vulkan.c
+@@ -354,14 +354,6 @@ static const VulkanOptExtension optional_device_exts[] = {
+     { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,            FF_VK_EXT_EXTERNAL_WIN32_MEMORY  },
+     { VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME,         FF_VK_EXT_EXTERNAL_WIN32_SEM     },
+ #endif
+-
+-    /* Video encoding/decoding */
+-    { VK_KHR_VIDEO_QUEUE_EXTENSION_NAME,                      FF_VK_EXT_NO_FLAG                },
+-    { VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME,               FF_VK_EXT_NO_FLAG                },
+-    { VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME,               FF_VK_EXT_NO_FLAG                },
+-    { VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
+-    { VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
+-    { VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
+ };
+ 
+ /* Converts return values to strings */
-- 
2.39.1

