aboutsummaryrefslogtreecommitdiff
path: root/lib/ffmpeg/patches
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2013-05-22 22:33:23 +0200
committerJoakim Plate <elupus@ecce.se>2013-05-22 22:33:23 +0200
commit4f47cfc9726c46ee69c72bdc4a28c15f1caea342 (patch)
tree6070c47ea00ca74a2ce881108bfb48bcba6b357e /lib/ffmpeg/patches
parentc1597430e6d2dfd6b644be0345e0df9e0fe44336 (diff)
ffmpeg: add patch file for vaapi fix
Diffstat (limited to 'lib/ffmpeg/patches')
-rw-r--r--lib/ffmpeg/patches/0038-vaapi-don-t-unmap-non-existing-buffer.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/ffmpeg/patches/0038-vaapi-don-t-unmap-non-existing-buffer.patch b/lib/ffmpeg/patches/0038-vaapi-don-t-unmap-non-existing-buffer.patch
new file mode 100644
index 0000000000..e1549d6a26
--- /dev/null
+++ b/lib/ffmpeg/patches/0038-vaapi-don-t-unmap-non-existing-buffer.patch
@@ -0,0 +1,30 @@
+From 28f92dfbd59197955f95a583a61a24428048f166 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Wed, 22 May 2013 22:24:07 +0200
+Subject: [PATCH 1/2] 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.
+---
+ libavcodec/vaapi.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libavcodec/vaapi.c b/libavcodec/vaapi.c
+index a220a9d..b991cde 100644
+--- a/libavcodec/vaapi.c
++++ b/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);
+--
+1.8.2
+