You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavfi/nlmeans_vulkan: fix memory leaks
This commit is contained in:
@@ -424,8 +424,6 @@ static av_cold int init_weights_pipeline(FFVulkanContext *vkctx, FFVkExecPool *e
|
|||||||
RET(ff_vk_init_compute_pipeline(vkctx, pl, shd));
|
RET(ff_vk_init_compute_pipeline(vkctx, pl, shd));
|
||||||
RET(ff_vk_exec_pipeline_register(vkctx, exec, pl));
|
RET(ff_vk_exec_pipeline_register(vkctx, exec, pl));
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (spv_opaque)
|
if (spv_opaque)
|
||||||
spv->free_shader(spv, &spv_opaque);
|
spv->free_shader(spv, &spv_opaque);
|
||||||
@@ -570,8 +568,6 @@ static av_cold int init_denoise_pipeline(FFVulkanContext *vkctx, FFVkExecPool *e
|
|||||||
RET(ff_vk_init_compute_pipeline(vkctx, pl, shd));
|
RET(ff_vk_init_compute_pipeline(vkctx, pl, shd));
|
||||||
RET(ff_vk_exec_pipeline_register(vkctx, exec, pl));
|
RET(ff_vk_exec_pipeline_register(vkctx, exec, pl));
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (spv_opaque)
|
if (spv_opaque)
|
||||||
spv->free_shader(spv, &spv_opaque);
|
spv->free_shader(spv, &spv_opaque);
|
||||||
@@ -671,8 +667,6 @@ static av_cold int init_filter(AVFilterContext *ctx)
|
|||||||
|
|
||||||
s->initialized = 1;
|
s->initialized = 1;
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (spv)
|
if (spv)
|
||||||
spv->uninit(&spv);
|
spv->uninit(&spv);
|
||||||
@@ -1065,6 +1059,9 @@ static void nlmeans_vulkan_uninit(AVFilterContext *avctx)
|
|||||||
|
|
||||||
ff_vk_uninit(&s->vkctx);
|
ff_vk_uninit(&s->vkctx);
|
||||||
|
|
||||||
|
av_freep(&s->xoffsets);
|
||||||
|
av_freep(&s->yoffsets);
|
||||||
|
|
||||||
s->initialized = 0;
|
s->initialized = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user