Skip to content

Commit

Permalink
vaapi: don't unmap non-existing buffer
Browse files Browse the repository at this point in the history
Some h264's can end up calling ff_vaapi_render_picture after a seek
with no buffer allocated and vaUnmapBuffer will assert on a invalid
buffer.
  • Loading branch information
elupus committed May 22, 2013
1 parent cc0c525 commit c159743
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ffmpeg/libavcodec/vaapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
VABufferID va_buffers[3];
unsigned int n_va_buffers = 0;

if (vactx->pic_param_buf_id)
vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id);
va_buffers[n_va_buffers++] = vactx->pic_param_buf_id;
}

if (vactx->iq_matrix_buf_id) {
vaUnmapBuffer(vactx->display, vactx->iq_matrix_buf_id);
Expand Down

0 comments on commit c159743

Please sign in to comment.