mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
frontends/va: Fix crash in vaRenderPicture when decoder is NULL
Fixes: d1b794685f ("frontends/va: Send all bitstream buffers to driver at once")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29599>
This commit is contained in:
parent
6cde457ab6
commit
0d21aa4a08
1 changed files with 3 additions and 1 deletions
|
|
@ -1077,7 +1077,9 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
|
|||
}
|
||||
}
|
||||
|
||||
if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM && context->bs.num_buffers) {
|
||||
if (context->decoder &&
|
||||
context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM &&
|
||||
context->bs.num_buffers) {
|
||||
context->decoder->decode_bitstream(context->decoder, context->target, &context->desc.base,
|
||||
context->bs.num_buffers, (const void * const*)context->bs.buffers, context->bs.sizes);
|
||||
context->bs.num_buffers = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue