From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavcodec/vaapi.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'ffmpeg/libavcodec/vaapi.c') diff --git a/ffmpeg/libavcodec/vaapi.c b/ffmpeg/libavcodec/vaapi.c index a220a9d..db4d29d 100644 --- a/ffmpeg/libavcodec/vaapi.c +++ b/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; @@ -194,26 +197,4 @@ void ff_vaapi_common_end_frame(AVCodecContext *avctx) vactx->slice_params_alloc = 0; } -int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx) -{ - struct vaapi_context * const vactx = avctx->hwaccel_context; - MpegEncContext *s = avctx->priv_data; - int ret; - - ret = ff_vaapi_commit_slices(vactx); - if (ret < 0) - goto finish; - - ret = ff_vaapi_render_picture(vactx, - ff_vaapi_get_surface_id(s->current_picture_ptr)); - if (ret < 0) - goto finish; - - ff_mpeg_draw_horiz_band(s, 0, s->avctx->height); - -finish: - ff_vaapi_common_end_frame(avctx); - return ret; -} - /* @} */ -- cgit v1.2.3