1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/scale_vulkan: use RET for checking return value

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
This commit is contained in:
Wu Jianhua 2022-01-17 18:00:02 +08:00 committed by Lynne
parent 8f470133f6
commit 50ca36f845

View File

@ -252,16 +252,12 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
return AVERROR(EINVAL);
}
err = ff_vk_create_buf(vkctx, &s->params_buf,
RET(ff_vk_create_buf(vkctx, &s->params_buf,
sizeof(*par),
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
if (err)
return err;
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
err = ff_vk_map_buffers(vkctx, &s->params_buf, (uint8_t **)&par, 1, 0);
if (err)
return err;
RET(ff_vk_map_buffers(vkctx, &s->params_buf, (uint8_t **)&par, 1, 0));
ff_fill_rgb2yuv_table(lcoeffs, tmp_mat);
@ -273,9 +269,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
par->yuv_matrix[3][3] = 1.0;
err = ff_vk_unmap_buffers(vkctx, &s->params_buf, 1, 1);
if (err)
return err;
RET(ff_vk_unmap_buffers(vkctx, &s->params_buf, 1, 1));
s->params_desc.buffer = s->params_buf.buf;
s->params_desc.range = VK_WHOLE_SIZE;
@ -475,11 +469,7 @@ static int scale_vulkan_config_output(AVFilterLink *outlink)
return AVERROR(EINVAL);
}
err = ff_vk_filter_config_output(outlink);
if (err < 0)
return err;
return 0;
return ff_vk_filter_config_output(outlink);
}
static void scale_vulkan_uninit(AVFilterContext *avctx)