mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
radeonsi/vcn: Unmap bitstream buffer in radeon_dec_destroy
If an error occured, the bitstream buffer may still be mapped when calling radeon_dec_destroy and this would trigger assert when destroying the bo. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
This commit is contained in:
parent
ed5794c5e3
commit
9a3a1027a6
1 changed files with 5 additions and 0 deletions
|
|
@ -2337,6 +2337,11 @@ static void radeon_dec_destroy(struct pipe_video_codec *decoder)
|
|||
|
||||
assert(decoder);
|
||||
|
||||
if (dec->bs_ptr) {
|
||||
dec->ws->buffer_unmap(dec->ws, dec->bs_buffers[dec->cur_buffer].res->buf);
|
||||
dec->bs_ptr = NULL;
|
||||
}
|
||||
|
||||
if (dec->stream_type != RDECODE_CODEC_JPEG) {
|
||||
map_msg_fb_it_probs_buf(dec);
|
||||
rvcn_dec_message_destroy(dec);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue