[FFmpeg-cvslog] vaapi: return early from ff_vaapi_render_picture() without picture
Carl Eugen Hoyos
git at videolan.org
Tue Jun 18 01:51:07 CEST 2013
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Jun 18 00:21:09 2013 +0200| [3cbf245f2a2cd2170ca30b0788c2af5b506fe6d6] | committer: Carl Eugen Hoyos
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
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3cbf245f2a2cd2170ca30b0788c2af5b506fe6d6
---
libavcodec/vaapi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/vaapi.c b/libavcodec/vaapi.c
index a220a9d..94959bf 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;
More information about the ffmpeg-cvslog
mailing list