History

avcodec/vulkan_video: Remove unused array

Andreas Rheinhardt committed 2 years ago

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

Showing the changes to libavcodec (1 of 1 file). Show all

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
309 int err;309 int err;
310 VkResult ret;310 VkResult ret;
311 FFVulkanFunctions *vk = &s->vkfn;311 FFVulkanFunctions *vk = &s->vkfn;
312 VkMemoryRequirements2 *mem_req = NULL;
313 VkVideoSessionMemoryRequirementsKHR *mem = NULL;312 VkVideoSessionMemoryRequirementsKHR *mem = NULL;
314 VkBindVideoSessionMemoryInfoKHR *bind_mem = NULL;313 VkBindVideoSessionMemoryInfoKHR *bind_mem = NULL;
315 314
@@ -340,11 +339,6 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 24 unmodified lines
340 err = AVERROR(ENOMEM);339 err = AVERROR(ENOMEM);
341 goto fail;340 goto fail;
342 }341 }
343 mem_req = av_mallocz(sizeof(*mem_req)*common->nb_mem);
344 if (!mem_req) {
345 err = AVERROR(ENOMEM);
346 goto fail;
347 }
348 bind_mem = av_mallocz(sizeof(*bind_mem)*common->nb_mem);342 bind_mem = av_mallocz(sizeof(*bind_mem)*common->nb_mem);
349 if (!bind_mem) {343 if (!bind_mem) {
350 err = AVERROR(ENOMEM);344 err = AVERROR(ENOMEM);
@@ -353,12 +347,8 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 2 unmodified lines
353 347
354 /* Set the needed fields to get the memory requirements */348 /* Set the needed fields to get the memory requirements */
355 for (int i = 0; i < common->nb_mem; i++) {349 for (int i = 0; i < common->nb_mem; i++) {
356 mem_req[i] = (VkMemoryRequirements2) {
357 .sType = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
358 };
359 mem[i] = (VkVideoSessionMemoryRequirementsKHR) {350 mem[i] = (VkVideoSessionMemoryRequirementsKHR) {
360 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR,351 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR,
361 .memoryRequirements = mem_req[i].memoryRequirements,
362 };352 };
363 }353 }
364 354
@@ -400,14 +390,12 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 35 unmodified lines
400 }390 }
401 391
402 av_freep(&mem);392 av_freep(&mem);
403 av_freep(&mem_req);
404 av_freep(&bind_mem);393 av_freep(&bind_mem);
405 394
406 return 0;395 return 0;
407 396
408fail:397fail:
409 av_freep(&mem);398 av_freep(&mem);
410 av_freep(&mem_req);
411 av_freep(&bind_mem);399 av_freep(&bind_mem);
412 400
413 ff_vk_video_common_uninit(s, common);401 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