Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Jianhua <jianhua.wu@intel.com>2021-11-19 16:52:38 +0300
committerLynne <dev@lynne.ee>2021-11-19 18:47:47 +0300
commita1d1663458887e753d9321a02713ffac6af2659c (patch)
tree9c0eeb94b6e763e84e151c44a50ffdba50dc8216 /libavfilter/vf_avgblur_vulkan.c
parentda72aca7b02503cdcdacd915dcf11929d29eecd1 (diff)
avfilter/avgblur_vulkan: check if shader is created with success
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
Diffstat (limited to 'libavfilter/vf_avgblur_vulkan.c')
-rw-r--r--libavfilter/vf_avgblur_vulkan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c
index 930f2a2bd9..1161cb013e 100644
--- a/libavfilter/vf_avgblur_vulkan.c
+++ b/libavfilter/vf_avgblur_vulkan.c
@@ -111,6 +111,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
shd = ff_vk_init_shader(s->pl_hor, "avgblur_compute_hor",
VK_SHADER_STAGE_COMPUTE_BIT);
+ if (!shd)
+ return AVERROR(ENOMEM);
ff_vk_set_compute_shader_sizes(shd, (int [3]){ CGS, 1, 1 });
@@ -154,6 +156,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
shd = ff_vk_init_shader(s->pl_ver, "avgblur_compute_ver",
VK_SHADER_STAGE_COMPUTE_BIT);
+ if (!shd)
+ return AVERROR(ENOMEM);
ff_vk_set_compute_shader_sizes(shd, (int [3]){ 1, CGS, 1 });