History

avcodec/vulkan_video: Remove unused array

Andreas Rheinhardt committed 2 years ago

Commit 6c82b7b1 parent 49707b01 file · +0 −12Browse files

Unified · Split

libavcodec/vulkan_video.c+0−12
@@ -309,7 +309,6 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 308 unmodified lines
309309 int err;
310310 VkResult ret;
311311 FFVulkanFunctions *vk = &s->vkfn;
312− VkMemoryRequirements2 *mem_req = NULL;
313312 VkVideoSessionMemoryRequirementsKHR *mem = NULL;
314313 VkBindVideoSessionMemoryInfoKHR *bind_mem = NULL;
315314
@@ -340,11 +339,6 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 24 unmodified lines
340339 err = AVERROR(ENOMEM);
341340 goto fail;
342341 }
343− mem_req = av_mallocz(sizeof(*mem_req)*common->nb_mem);
344− if (!mem_req) {
345− err = AVERROR(ENOMEM);
346− goto fail;
347− }
348342 bind_mem = av_mallocz(sizeof(*bind_mem)*common->nb_mem);
349343 if (!bind_mem) {
350344 err = AVERROR(ENOMEM);
@@ -353,12 +347,8 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 2 unmodified lines
353347
354348 /* Set the needed fields to get the memory requirements */
355349 for (int i = 0; i < common->nb_mem; i++) {
356− mem_req[i] = (VkMemoryRequirements2) {
357− .sType = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
358− };
359350 mem[i] = (VkVideoSessionMemoryRequirementsKHR) {
360351 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR,
361− .memoryRequirements = mem_req[i].memoryRequirements,
362352 };
363353 }
364354
@@ -400,14 +390,12 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 35 unmodified lines
400390 }
401391
402392 av_freep(&mem);
403− av_freep(&mem_req);
404393 av_freep(&bind_mem);
405394
406395 return 0;
407396
408397 fail:
409398 av_freep(&mem);
410− av_freep(&mem_req);
411399 av_freep(&bind_mem);
412400
413401 ff_vk_video_common_uninit(s, common);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t