diff options
Diffstat (limited to 'ffmpeg/libavcodec/vaapi.c')
| -rw-r--r-- | ffmpeg/libavcodec/vaapi.c | 25 |
1 files changed, 3 insertions, 22 deletions
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; -} - /* @} */ |
