diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-06-18 00:21:09 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-06-18 00:21:09 +0200 |
commit | 3cbf245f2a2cd2170ca30b0788c2af5b506fe6d6 (patch) | |
tree | e7a3c609a00c040525baaf7cf99316e3a9bc492e /libavcodec | |
parent | ac604e446b5e0031fad42ab190cc2019a898c241 (diff) | |
download | ffmpeg-3cbf245f2a2cd2170ca30b0788c2af5b506fe6d6.tar.gz |
vaapi: return early from ff_vaapi_render_picture() without picture
Fixes an assertion when called on uninitialized frame. Spotted after
seeking in vlc.
Fixes ticket #2461.
Tested-by: Timo
Reviewed-by: Joakim Plate
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vaapi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/vaapi.c b/libavcodec/vaapi.c index a220a9d3c2..94959bf5ed 100644 --- a/libavcodec/vaapi.c +++ b/libavcodec/vaapi.c @@ -46,6 +46,9 @@ 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) + return 0; + vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id); va_buffers[n_va_buffers++] = vactx->pic_param_buf_id; |