History

avfilter/avgblur_vulkan: check if shader is created with success

Wu Jianhua committed 4 years ago

Commit a1d16631 parent da72aca1 file · +4 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_avgblur_vulkan.c+4−0
@@ -111,6 +111,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) · 110 unmodified lines
111111
112112 shd = ff_vk_init_shader(s->pl_hor, "avgblur_compute_hor",
113113 VK_SHADER_STAGE_COMPUTE_BIT);
114+ if (!shd)
115+ return AVERROR(ENOMEM);
114116
115117 ff_vk_set_compute_shader_sizes(shd, (int [3]){ CGS, 1, 1 });
116118
@@ -154,6 +156,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) · 37 unmodified lines
154156
155157 shd = ff_vk_init_shader(s->pl_ver, "avgblur_compute_ver",
156158 VK_SHADER_STAGE_COMPUTE_BIT);
159+ if (!shd)
160+ return AVERROR(ENOMEM);
157161
158162 ff_vk_set_compute_shader_sizes(shd, (int [3]){ 1, CGS, 1 });
159163

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t