Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2018-07-03 21:16:24 +0300
committerMark Thompson <sw@jkqxz.net>2018-07-12 01:03:46 +0300
commit48a1abed133d005aa4d7f49e4fdd5bef9aa263f5 (patch)
treec6d770a615ddfacc46aaa15a1a225939e982402b /libavfilter/vf_program_opencl.c
parent09628cb1b4cc1fba5d2eb2882562a939444a57e4 (diff)
lavfi/opencl: add macro for opencl error handling.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Diffstat (limited to 'libavfilter/vf_program_opencl.c')
-rw-r--r--libavfilter/vf_program_opencl.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c
index a0027923fb..dfb25652bc 100644
--- a/libavfilter/vf_program_opencl.c
+++ b/libavfilter/vf_program_opencl.c
@@ -148,21 +148,11 @@ static int program_opencl_run(AVFilterContext *avctx)
cle = clEnqueueNDRangeKernel(ctx->command_queue, ctx->kernel, 2, NULL,
global_work, NULL, 0, NULL, NULL);
- if (cle != CL_SUCCESS) {
- av_log(avctx, AV_LOG_ERROR, "Failed to enqueue kernel: %d.\n",
- cle);
- err = AVERROR(EIO);
- goto fail;
- }
+ CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to enqueue kernel: %d.\n", cle);
}
cle = clFinish(ctx->command_queue);
- if (cle != CL_SUCCESS) {
- av_log(avctx, AV_LOG_ERROR, "Failed to finish command queue: %d.\n",
- cle);
- err = AVERROR(EIO);
- goto fail;
- }
+ CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to finish command queue: %d.\n", cle);
if (ctx->nb_inputs > 0) {
err = av_frame_copy_props(output, ctx->frames[0]);