mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/vulkan_video: Remove unused array
Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
49707b0590
commit
6c82b7bc0a
@ -309,7 +309,6 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s,
|
|||||||
int err;
|
int err;
|
||||||
VkResult ret;
|
VkResult ret;
|
||||||
FFVulkanFunctions *vk = &s->vkfn;
|
FFVulkanFunctions *vk = &s->vkfn;
|
||||||
VkMemoryRequirements2 *mem_req = NULL;
|
|
||||||
VkVideoSessionMemoryRequirementsKHR *mem = NULL;
|
VkVideoSessionMemoryRequirementsKHR *mem = NULL;
|
||||||
VkBindVideoSessionMemoryInfoKHR *bind_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);
|
err = AVERROR(ENOMEM);
|
||||||
goto fail;
|
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);
|
bind_mem = av_mallocz(sizeof(*bind_mem)*common->nb_mem);
|
||||||
if (!bind_mem) {
|
if (!bind_mem) {
|
||||||
err = AVERROR(ENOMEM);
|
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 */
|
/* Set the needed fields to get the memory requirements */
|
||||||
for (int i = 0; i < common->nb_mem; i++) {
|
for (int i = 0; i < common->nb_mem; i++) {
|
||||||
mem_req[i] = (VkMemoryRequirements2) {
|
|
||||||
.sType = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
|
|
||||||
};
|
|
||||||
mem[i] = (VkVideoSessionMemoryRequirementsKHR) {
|
mem[i] = (VkVideoSessionMemoryRequirementsKHR) {
|
||||||
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR,
|
.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);
|
||||||
av_freep(&mem_req);
|
|
||||||
av_freep(&bind_mem);
|
av_freep(&bind_mem);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
av_freep(&mem);
|
av_freep(&mem);
|
||||||
av_freep(&mem_req);
|
|
||||||
av_freep(&bind_mem);
|
av_freep(&bind_mem);
|
||||||
|
|
||||||
ff_vk_video_common_uninit(s, common);
|
ff_vk_video_common_uninit(s, common);
|
||||||
|
Loading…
Reference in New Issue
Block a user