diff mbox series

[FFmpeg-devel,01/11] avfilter/avgblur_vulkan: check if shader is created with success

Message ID 20211119135248.14518-1-jianhua.wu@intel.com
State Accepted
Commit a1d1663458887e753d9321a02713ffac6af2659c
Headers show
Series [FFmpeg-devel,01/11] avfilter/avgblur_vulkan: check if shader is created with success | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Wu Jianhua Nov. 19, 2021, 1:52 p.m. UTC
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
---
 libavfilter/vf_avgblur_vulkan.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c
index d37d5a62b1..93b59ebb7d 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 });