mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-03-04 10:07:53 +00:00
vaapi_encode: Destroy output buffer pool before VA context
The buffers are created associated with the context, so they should be destroyed before the context is. This is enforced by the iHD driver.
This commit is contained in:
parent
c8e135ea92
commit
216c44dfc1
@ -1556,6 +1556,8 @@ av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
|
||||
vaapi_encode_free(avctx, pic);
|
||||
}
|
||||
|
||||
av_buffer_pool_uninit(&ctx->output_buffer_pool);
|
||||
|
||||
if (ctx->va_context != VA_INVALID_ID) {
|
||||
vaDestroyContext(ctx->hwctx->display, ctx->va_context);
|
||||
ctx->va_context = VA_INVALID_ID;
|
||||
@ -1566,8 +1568,6 @@ av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
|
||||
ctx->va_config = VA_INVALID_ID;
|
||||
}
|
||||
|
||||
av_buffer_pool_uninit(&ctx->output_buffer_pool);
|
||||
|
||||
av_freep(&ctx->codec_sequence_params);
|
||||
av_freep(&ctx->codec_picture_params);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user