[FFmpeg-cvslog] avfilter/scale_vulkan: use RET for checking return value
Wu Jianhua
git at videolan.org
Tue Feb 22 07:14:59 EET 2022
ffmpeg | branch: master | Wu Jianhua <jianhua.wu at intel.com> | Mon Jan 17 18:00:02 2022 +0800| [50ca36f84580d1e4493472c820290c11d003c540] | committer: Lynne
avfilter/scale_vulkan: use RET for checking return value
Signed-off-by: Wu Jianhua <jianhua.wu at intel.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=50ca36f84580d1e4493472c820290c11d003c540
---
libavfilter/vf_scale_vulkan.c | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c
index c87a8d7e2e..5fe36ca7b0 100644
--- a/libavfilter/vf_scale_vulkan.c
+++ b/libavfilter/vf_scale_vulkan.c
@@ -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,
- sizeof(*par),
- VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
- if (err)
- return err;
+ RET(ff_vk_create_buf(vkctx, &s->params_buf,
+ sizeof(*par),
+ VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
+ 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)
More information about the ffmpeg-cvslog
mailing list