Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2013-06-18 03:56:06 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-18 03:56:06 +0400
commit2ee380aefbb92c89e8e9c7aa5846aa404919ec7c (patch)
treee7a3c609a00c040525baaf7cf99316e3a9bc492e /libavcodec/vaapi.c
parent28bf0d94aaf577e3ff593cfaa831f467cf2568e2 (diff)
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>
Diffstat (limited to 'libavcodec/vaapi.c')
-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;