intel / intel/libva

The |data| argument in vaCreateBuffer() should be const void*

Open
#597 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
784
Forks
314
PR merge metrics
No merged PRs in 30d

Description

This is a minor problem.
The type of |data| argument in vaCreateBuffer() is void*.
If |data| is null, it is not used in the function.
If |data| is not null, it is copied to a created buffer in the function.
In both cases, |data| is not written. That is, like the type of the source in memcpy(), the |data| type should be const void*.
A VA-API application is likely implemented as a variable type for |data| is const void*.
In fact, chrome has to drop const in implementation around this function due to this type mismatch.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.