Browse Source

avutil/opencl_internal: add av_warn_unused_result

clSetKernelArg can return an error due to lack of memory (for instance):
https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetKernelArg.html.
Thus this error must be propagated.

Currently should not trigger warnings, but adds robustness.
Untested.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
tags/n3.0
Ganesh Ajjanagadde 10 years ago
parent
commit
8a5b60a6b1
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavutil/opencl_internal.h

+ 2
- 0
libavutil/opencl_internal.h View File

@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "attributes.h"
#include "opencl.h"

#define FF_OPENCL_PARAM_INFO(a) ((void*)(&(a))), (sizeof(a))
@@ -30,4 +31,5 @@ typedef struct {
void *ctx;
} FFOpenclParam;

av_warn_unused_result
int avpriv_opencl_set_parameter(FFOpenclParam *opencl_param, ...);

Loading…
Cancel
Save