[FFmpeg-cvslog] avutil/opencl: replace assert by check and error message in av_opencl_init( )
highgod0401
git at videolan.org
Thu Apr 4 19:35:32 CEST 2013
ffmpeg | branch: master | highgod0401 <highgod0401 at gmail.com> | Thu Apr 4 20:20:47 2013 +0800| [cfaffb1ab7de383e8fe67add8ff42f0a2c52ff97] | committer: Michael Niedermayer
avutil/opencl: replace assert by check and error message in av_opencl_init()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cfaffb1ab7de383e8fe67add8ff42f0a2c52ff97
---
libavutil/opencl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 0bf7a82..c6d555c 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -554,7 +554,12 @@ int av_opencl_init(AVDictionary *options, AVOpenCLExternalEnv *ext_opencl_env)
ret = compile_kernel_file(&gpu_env, NULL);
if (ret < 0)
goto end;
- av_assert1(gpu_env.kernel_code_count > 0);
+ if (gpu_env.kernel_code_count <= 0) {
+ av_log(&openclutils, AV_LOG_ERROR,
+ "No kernel code is registered, compile kernel file failed\n");
+ ret = AVERROR(EINVAL);
+ goto end;
+ }
gpu_env.init_count++;
end:
More information about the ffmpeg-cvslog
mailing list