Commit 0b384dd1 authored by Jean-Paul Saman's avatar Jean-Paul Saman

VAAPI-X11: Make sure the base pointer for vaMapBuffer is NULL at start

Set p_base to NULL before passing it to vaMapBuffer.
parent 91f15717
......@@ -958,7 +958,7 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic,
assert(image->image_id != VA_INVALID_ID);
assert(image->buf != VA_INVALID_ID);
void *p_base;
void *p_base = NULL;
status = vaMapBuffer(sys->conn->p_display, image->buf, &p_base);
if (status != VA_STATUS_SUCCESS)
{
......@@ -971,6 +971,7 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic,
image->format.bits_per_pixel, pic->format.i_bits_per_pixel);
goto out_va_free;
}
assert(p_base); /* should not happen */
for (unsigned int i_plane = 0; i_plane < image->num_planes; i_plane++)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment