git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e78801
)
hwcontext_vaapi: Add an assert in vaapi_map_from_drm()
author
Haihao Xiang
<haihao.xiang@intel.com>
Thu, 10 May 2018 03:08:23 +0000
(11:08 +0800)
committer
Mark Thompson
<sw@jkqxz.net>
Thu, 10 May 2018 18:52:53 +0000
(19:52 +0100)
Every fourcc in vaapi_drm_format_map should be in
vaapi_format_map, so add an assert to ensure we have the right maps.
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
libavutil/hwcontext_vaapi.c
patch
|
blob
|
history
diff --git
a/libavutil/hwcontext_vaapi.c
b/libavutil/hwcontext_vaapi.c
index
7daaa95
..
e55bb8d
100644
(file)
--- a/
libavutil/hwcontext_vaapi.c
+++ b/
libavutil/hwcontext_vaapi.c
@@
-1028,6
+1028,8
@@
static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
va_rt_format = vaapi_format_map[i].rt_format;
}
+ av_assert0(i < FF_ARRAY_ELEMS(vaapi_format_map));
+
buffer_handle = desc->objects[0].fd;
buffer_desc.pixel_format = va_fourcc;
buffer_desc.width = src_fc->width;