Commit 9e3e9a37 authored by Mark Thompson's avatar Mark Thompson

Merge commit '216c44df'

* commit '216c44df':
  vaapi_encode: Destroy output buffer pool before VA context
Merged-by: 's avatarMark Thompson <sw@jkqxz.net>
parents fe1fb48e 216c44df
...@@ -1564,6 +1564,8 @@ av_cold int ff_vaapi_encode_close(AVCodecContext *avctx) ...@@ -1564,6 +1564,8 @@ av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
vaapi_encode_free(avctx, pic); vaapi_encode_free(avctx, pic);
} }
av_buffer_pool_uninit(&ctx->output_buffer_pool);
if (ctx->va_context != VA_INVALID_ID) { if (ctx->va_context != VA_INVALID_ID) {
vaDestroyContext(ctx->hwctx->display, ctx->va_context); vaDestroyContext(ctx->hwctx->display, ctx->va_context);
ctx->va_context = VA_INVALID_ID; ctx->va_context = VA_INVALID_ID;
...@@ -1574,8 +1576,6 @@ av_cold int ff_vaapi_encode_close(AVCodecContext *avctx) ...@@ -1574,8 +1576,6 @@ av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
ctx->va_config = VA_INVALID_ID; ctx->va_config = VA_INVALID_ID;
} }
av_buffer_pool_uninit(&ctx->output_buffer_pool);
av_freep(&ctx->codec_sequence_params); av_freep(&ctx->codec_sequence_params);
av_freep(&ctx->codec_picture_params); av_freep(&ctx->codec_picture_params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment