Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -309,7 +309,6 @@ av_cold int ff_vk_video_common_init(void *log, FFVulkanContext *s, · 308 unmodified lines | ||
| 309 | 309 | int err; |
| 310 | 310 | VkResult ret; |
| 311 | 311 | FFVulkanFunctions *vk = &s->vkfn; |
| 312 | − VkMemoryRequirements2 *mem_req = NULL; | |
| 313 | 312 | VkVideoSessionMemoryRequirementsKHR *mem = NULL; |
| 314 | 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 | 339 | err = AVERROR(ENOMEM); |
| 341 | 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 | 342 | bind_mem = av_mallocz(sizeof(*bind_mem)*common->nb_mem); |
| 349 | 343 | if (!bind_mem) { |
| 350 | 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 | 348 | /* Set the needed fields to get the memory requirements */ |
| 355 | 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 | 350 | mem[i] = (VkVideoSessionMemoryRequirementsKHR) { |
| 360 | 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 | 392 | av_freep(&mem); |
| 403 | − av_freep(&mem_req); | |
| 404 | 393 | av_freep(&bind_mem); |
| 405 | 394 | |
| 406 | 395 | return 0; |
| 407 | 396 | |
| 408 | 397 | fail: |
| 409 | 398 | av_freep(&mem); |
| 410 | − av_freep(&mem_req); | |
| 411 | 399 | av_freep(&bind_mem); |
| 412 | 400 | |
| 413 | 401 | ff_vk_video_common_uninit(s, common); |