[FFmpeg-cvslog] avcodec/vulkan_video: Remove unused array

Andreas Rheinhardt git at videolan.org
Thu Mar 7 10:01:29 EET 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Mar  7 00:12:42 2024 +0100| [6c82b7bc0a5ea41f4094ebb4c40ab4e1b230c4cf] | committer: Andreas Rheinhardt

avcodec/vulkan_video: Remove unused array

Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c82b7bc0a5ea41f4094ebb4c40ab4e1b230c4cf
---

 libavcodec/vulkan_video.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c
index a87df52871..dc6652709f 100644
--- a/libavcodec/vulkan_video.c
+++ b/libavcodec/vulkan_video.c
@@ -309,7 +309,6 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s,
     int err;
     VkResult ret;
     FFVulkanFunctions *vk = &s->vkfn;
-    VkMemoryRequirements2 *mem_req = NULL;
     VkVideoSessionMemoryRequirementsKHR *mem = NULL;
     VkBindVideoSessionMemoryInfoKHR *bind_mem = NULL;
 
@@ -340,11 +339,6 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s,
         err = AVERROR(ENOMEM);
         goto fail;
     }
-    mem_req = av_mallocz(sizeof(*mem_req)*common->nb_mem);
-    if (!mem_req) {
-        err = AVERROR(ENOMEM);
-        goto fail;
-    }
     bind_mem = av_mallocz(sizeof(*bind_mem)*common->nb_mem);
     if (!bind_mem) {
         err = AVERROR(ENOMEM);
@@ -353,12 +347,8 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s,
 
     /* Set the needed fields to get the memory requirements */
     for (int i = 0; i < common->nb_mem; i++) {
-        mem_req[i] = (VkMemoryRequirements2) {
-            .sType = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
-        };
         mem[i] = (VkVideoSessionMemoryRequirementsKHR) {
             .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR,
-            .memoryRequirements = mem_req[i].memoryRequirements,
         };
     }
 
@@ -400,14 +390,12 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s,
     }
 
     av_freep(&mem);
-    av_freep(&mem_req);
     av_freep(&bind_mem);
 
     return 0;
 
 fail:
     av_freep(&mem);
-    av_freep(&mem_req);
     av_freep(&bind_mem);
 
     ff_vk_video_common_uninit(s, common);



More information about the ffmpeg-cvslog mailing list