aboutsummaryrefslogtreecommitdiff
path: root/lib/ffmpeg/libavcodec
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2013-06-17 22:34:53 +0200
committerMemphiz <memphis@machzwo.de>2013-06-17 22:36:13 +0200
commit2e8f5694a74b01c97e99b8bce7cc3569ce637ade (patch)
treecb7283fe87019444a2aac3ff37cbab450e1d5008 /lib/ffmpeg/libavcodec
parentb74653197bfdd302313f8499ef0fca264ad84ef7 (diff)
[ffmpeg] - backport fix for crashing when using vaapi (found on libav mailing list) - this was signed off by elupus
Diffstat (limited to 'lib/ffmpeg/libavcodec')
-rw-r--r--lib/ffmpeg/libavcodec/vaapi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ffmpeg/libavcodec/vaapi.c b/lib/ffmpeg/libavcodec/vaapi.c
index a220a9d3c2..94959bf5ed 100644
--- a/lib/ffmpeg/libavcodec/vaapi.c
+++ b/lib/ffmpeg/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;