aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vaapi_encode.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-02-21 21:51:28 +0000
committerMark Thompson <sw@jkqxz.net>2018-02-21 21:51:28 +0000
commit9e3e9a37289c1a9cdfdb6c7389a3ece3cfa4749c (patch)
tree7cfa707fad342c7ceb77fcad818ca736845a1f67 /libavcodec/vaapi_encode.c
parentfe1fb48e2bd1e5bddcde8b898084851cc8f6939c (diff)
parent216c44dfc17252ec0681dcb0bbeeb45a9d14eca7 (diff)
downloadffmpeg-9e3e9a37289c1a9cdfdb6c7389a3ece3cfa4749c.tar.gz
Merge commit '216c44dfc17252ec0681dcb0bbeeb45a9d14eca7'
* commit '216c44dfc17252ec0681dcb0bbeeb45a9d14eca7': vaapi_encode: Destroy output buffer pool before VA context Merged-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/vaapi_encode.c')
-rw-r--r--libavcodec/vaapi_encode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index f552071802..f5785ce4c5 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -1564,6 +1564,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;
@@ -1574,8 +1576,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);