summaryrefslogtreecommitdiffstats
path: root/libavcodec/vaapi_encode.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-12-17 19:48:35 +0000
committerMark Thompson <sw@jkqxz.net>2018-02-20 22:04:12 +0000
commit216c44dfc17252ec0681dcb0bbeeb45a9d14eca7 (patch)
tree2190a75db8a96e5c4887d5bf4fd5fd6ac7005740 /libavcodec/vaapi_encode.c
parentc8e135ea9225137050a6315fd9ba9c0f242c90b6 (diff)
downloadffmpeg-streaming-216c44dfc17252ec0681dcb0bbeeb45a9d14eca7.zip
ffmpeg-streaming-216c44dfc17252ec0681dcb0bbeeb45a9d14eca7.tar.gz
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.
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 c6113b1..398b8e1 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -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);
OpenPOWER on IntegriCloud