aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2013-06-18 01:56:06 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-18 02:12:18 +0200
commit054779625f76bcc3dea9ff1175f4eedc8847c187 (patch)
tree9143d18505fe171b15fc49e325132d3bf585a51c
parente22dd7fbd09d9384a08b11bafe3d1bbe0a89bf8b (diff)
downloadffmpeg-054779625f76bcc3dea9ff1175f4eedc8847c187.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 Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at> (cherry picked from commit 2ee380aefbb92c89e8e9c7aa5846aa404919ec7c)
-rw-r--r--libavcodec/vaapi.c3
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;