diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index 58ddef9f418..5b5c4dfd5c7 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -769,7 +769,8 @@ vl_mpeg12_end_frame(struct pipe_video_codec *decoder, vl_vb_unmap(&buf->vertex_stream, dec->context); - dec->context->transfer_unmap(dec->context, buf->tex_transfer); + if (buf->tex_transfer) + dec->context->transfer_unmap(dec->context, buf->tex_transfer); vb[0] = dec->quads; vb[1] = dec->pos; diff --git a/src/gallium/auxiliary/vl/vl_vertex_buffers.c b/src/gallium/auxiliary/vl/vl_vertex_buffers.c index 0cf8582f810..00c424f3bb4 100644 --- a/src/gallium/auxiliary/vl/vl_vertex_buffers.c +++ b/src/gallium/auxiliary/vl/vl_vertex_buffers.c @@ -352,11 +352,13 @@ vl_vb_unmap(struct vl_vertex_buffer *buffer, struct pipe_context *pipe) assert(buffer && pipe); for (i = 0; i < VL_NUM_COMPONENTS; ++i) { - pipe_buffer_unmap(pipe, buffer->ycbcr[i].transfer); + if (buffer->ycbcr[i].transfer) + pipe_buffer_unmap(pipe, buffer->ycbcr[i].transfer); } for (i = 0; i < VL_MAX_REF_FRAMES; ++i) { - pipe_buffer_unmap(pipe, buffer->mv[i].transfer); + if (buffer->mv[i].transfer) + pipe_buffer_unmap(pipe, buffer->mv[i].transfer); } }