diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-09-30 22:21:46 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-10-02 12:41:45 +0300 |
commit | 2124711b950b03c582a119c75f52a87acc32d6ec (patch) | |
tree | 69987dd522a5716aeba2aedde4ca4b53c326083b /libavutil/hwcontext_vaapi.c | |
parent | b57e38f52cc3f31a27105c28887d57cd6812c3eb (diff) |
hwcontext_vaapi: add a quirk for the missing MemoryType attribute
The Intel binary iHD driver does not support the
VASurfaceAttribMemoryType, so surface allocation will fail when using
it.
Diffstat (limited to 'libavutil/hwcontext_vaapi.c')
-rw-r--r-- | libavutil/hwcontext_vaapi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index bba0c4d701..cd7d43eb8d 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -273,6 +273,11 @@ static const struct { "i965", AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS, }, + { + "Intel iHD", + "ubit", + AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE, + }, }; static int vaapi_device_init(AVHWDeviceContext *hwdev) @@ -447,7 +452,8 @@ static int vaapi_frames_init(AVHWFramesContext *hwfc) } if (!hwfc->pool) { - int need_memory_type = 1, need_pixel_format = 1; + int need_memory_type = !(hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE); + int need_pixel_format = 1; for (i = 0; i < avfc->nb_attributes; i++) { if (ctx->attributes[i].type == VASurfaceAttribMemoryType) need_memory_type = 0; |