You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
vulkan_decode: check if yuv_sampler exists before freeing it
This prevents multiple NULL accesses - if yuv_sampler exists, then everything required for it to be destroyed also exists.
This commit is contained in:
@@ -581,8 +581,9 @@ static void free_common(void *opaque, uint8_t *data)
|
|||||||
|
|
||||||
ff_vk_video_common_uninit(s, &ctx->common);
|
ff_vk_video_common_uninit(s, &ctx->common);
|
||||||
|
|
||||||
vk->DestroySamplerYcbcrConversion(s->hwctx->act_dev, ctx->yuv_sampler,
|
if (ctx->yuv_sampler)
|
||||||
s->hwctx->alloc);
|
vk->DestroySamplerYcbcrConversion(s->hwctx->act_dev, ctx->yuv_sampler,
|
||||||
|
s->hwctx->alloc);
|
||||||
|
|
||||||
ff_vk_uninit(s);
|
ff_vk_uninit(s);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user