frontends/va: use the entrypoint from context instead of the hard-coded one

It could fail the case where this is only encode available.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11201>
This commit is contained in:
Leo Liu 2021-06-05 19:34:40 -04:00
parent 4c0420d44e
commit b8574cdaa8
1 changed files with 1 additions and 1 deletions

View File

@ -675,7 +675,7 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
}
format = screen->get_video_param(screen, context->decoder->profile,
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
context->decoder->entrypoint,
PIPE_VIDEO_CAP_PREFERED_FORMAT);
if (surf->buffer->buffer_format != format &&