diff options
author | Joakim Plate <elupus@ecce.se> | 2013-05-22 22:24:07 +0200 |
---|---|---|
committer | Joakim Plate <elupus@ecce.se> | 2013-05-22 22:26:53 +0200 |
commit | c1597430e6d2dfd6b644be0345e0df9e0fe44336 (patch) | |
tree | 65fdccc5d1afc2b01f6e6a33f726d0efea94bb35 /lib/ffmpeg/libavcodec | |
parent | cc0c52582133584230d9ab909f16ff6d645342e0 (diff) |
vaapi: don't unmap non-existing buffer
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.
Diffstat (limited to 'lib/ffmpeg/libavcodec')
-rw-r--r-- | lib/ffmpeg/libavcodec/vaapi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ffmpeg/libavcodec/vaapi.c b/lib/ffmpeg/libavcodec/vaapi.c index a220a9d3c2..b991cde782 100644 --- a/lib/ffmpeg/libavcodec/vaapi.c +++ b/lib/ffmpeg/libavcodec/vaapi.c @@ -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); |