Message ID | 20180510030823.15271-2-haihao.xiang@intel.com |
---|---|
State | Accepted |
Commit | bed670a1de29b58fcb3fe046562d8bd125b1457f |
Headers | show |
On 10/05/18 04:08, Haihao Xiang wrote: > The flag of input_available must be set when pic_start is not NULL, so > add an assert to ensure it is true. In addition, the assert on last_pic > is unnecessary now, so remove this assert. > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > --- > libavcodec/vaapi_encode.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) On 10/05/18 04:08, Haihao Xiang wrote: > 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 | 2 ++ > 1 file changed, 2 insertions(+) Both applied. Thanks, - Mark
On Thu, 2018-05-10 at 20:04 +0100, Mark Thompson wrote: > On 10/05/18 04:08, Haihao Xiang wrote: > > The flag of input_available must be set when pic_start is not NULL, so > > add an assert to ensure it is true. In addition, the assert on last_pic > > is unnecessary now, so remove this assert. > > > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > > --- > > libavcodec/vaapi_encode.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > On 10/05/18 04:08, Haihao Xiang wrote: > > 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 | 2 ++ > > 1 file changed, 2 insertions(+) > > Both applied. Thanks for applying the patches. Best Regards Haihao > > Thanks, > > - Mark > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 7daaa951cc..e55bb8db3f 100644 --- 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;
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 | 2 ++ 1 file changed, 2 insertions(+)