Re: [FFmpeg-devel] [PATCH 1/2] lavu/hwcontext_vaapi: cope with race map for YUV420P

2019-09-03 Thread Fu, Linjie
> -Original Message- > From: Fu, Linjie > Sent: Thursday, August 15, 2019 12:33 > To: ffmpeg-devel@ffmpeg.org > Cc: Fu, Linjie > Subject: [PATCH 1/2] lavu/hwcontext_vaapi: cope with race map for > YUV420P > > There is a race condition for AV_PIX_FMT_YUV420P when mapping from > pix_fmt >

[FFmpeg-devel] [PATCH 1/2] lavu/hwcontext_vaapi: cope with race map for YUV420P

2019-08-14 Thread Linjie Fu
There is a race condition for AV_PIX_FMT_YUV420P when mapping from pix_fmt to fourcc, both VA_FOURCC_I420 and VA_FOURCC_YV12 could be found by pix_fmt. Currently, vaapi_get_image_format will go through the query results of pix_fmt and returned the first matched result according to the declared