Signed-off-by: Wu Jianhua <jianhua...@intel.com>
---
 libavfilter/vf_avgblur_vulkan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c
index 4795e482a9..253290663b 100644
--- a/libavfilter/vf_avgblur_vulkan.c
+++ b/libavfilter/vf_avgblur_vulkan.c
@@ -110,6 +110,8 @@ static av_cold int init_filter(AVFilterContext *ctx, 
AVFrame *in)
 
         shd = ff_vk_init_shader(ctx, s->pl_hor, "avgblur_compute_hor",
                                 VK_SHADER_STAGE_COMPUTE_BIT);
+        if (!shd)
+            return AVERROR(ENOMEM);
 
         ff_vk_set_compute_shader_sizes(ctx, shd, (int [3]){ CGS, 1, 1 });
 
@@ -153,6 +155,8 @@ static av_cold int init_filter(AVFilterContext *ctx, 
AVFrame *in)
 
         shd = ff_vk_init_shader(ctx, s->pl_ver, "avgblur_compute_ver",
                                 VK_SHADER_STAGE_COMPUTE_BIT);
+        if (!shd)
+            return AVERROR(ENOMEM);
 
         ff_vk_set_compute_shader_sizes(ctx, shd, (int [3]){ 1, CGS, 1 });
 
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to