[FFmpeg-devel] [PATCH 6/6] hwcontext_vaapi: Add support for mapping to DRM objects
Derek Buitenhuis
derek.buitenhuis at gmail.com
Sun Oct 8 19:03:39 EEST 2017
On 10/8/2017 4:11 PM, Mark Thompson wrote:
> Uses vaExportSurfaceHandle() from libva2.
> ---
> libavutil/hwcontext_vaapi.c | 106 +++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 104 insertions(+), 2 deletions(-)
[...]
> + for (i = 0; i < drm_desc->nb_objects; i++)
> + close(drm_desc->objects[i].fd);
Delightful API...
> + surface_id = (VASurfaceID)(uintptr_t)src->data[3];
Can you elaborate a bit on this part? Casting pointers to uintptr_t and storing
them is always a red flag to me... C standard issues, etc.
> + dst->data[0] = (uint8_t*)drm_desc;
This is also a bit wtf-looking... is it cast back at some point? That could be
problematic.
- Derek
More information about the ffmpeg-devel
mailing list