mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
vaapi: return early from ff_vaapi_render_picture() without picture
Fixes an assertion when called on uninitialized frame. Spotted after seeking in vlc. Fixes ticket #2461. Tested-by: Timo Reviewed-by: Joakim Plate
This commit is contained in:
parent
ac604e446b
commit
3cbf245f2a
@ -46,6 +46,9 @@ int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
|
|||||||
VABufferID va_buffers[3];
|
VABufferID va_buffers[3];
|
||||||
unsigned int n_va_buffers = 0;
|
unsigned int n_va_buffers = 0;
|
||||||
|
|
||||||
|
if (!vactx->pic_param_buf_id)
|
||||||
|
return 0;
|
||||||
|
|
||||||
vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id);
|
vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id);
|
||||||
va_buffers[n_va_buffers++] = vactx->pic_param_buf_id;
|
va_buffers[n_va_buffers++] = vactx->pic_param_buf_id;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user