diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-10-01 22:51:20 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-10-25 00:00:49 +0100 |
commit | bfc83acfd6b33986480d4c6d3c571ba6a59f1d98 (patch) | |
tree | c452da6579dc1d62602d3c51d829e427a03b1636 /libavcodec | |
parent | f0a978a519167e5ad5dd479245a7b5da77488d43 (diff) | |
download | ffmpeg-bfc83acfd6b33986480d4c6d3c571ba6a59f1d98.tar.gz |
vaapi: Always free parameter buffers after vaEndPicture() with libva2
This is an ABI change in libva2: previously the Intel driver had this
behaviour and it was implemented as a driver quirk, but now it is part
of the specification so all drivers must do it.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vaapi_decode.c | 4 | ||||
-rw-r--r-- | libavcodec/vaapi_encode.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index febe22a710..02304191ff 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -189,14 +189,14 @@ int ff_vaapi_decode_issue(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "Failed to end picture decode " "issue: %d (%s).\n", vas, vaErrorStr(vas)); err = AVERROR(EIO); - if (ctx->hwctx->driver_quirks & + if (HAVE_VAAPI_1 || ctx->hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) goto fail; else goto fail_at_end; } - if (ctx->hwctx->driver_quirks & + if (HAVE_VAAPI_1 || ctx->hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) ff_vaapi_decode_destroy_buffers(avctx, pic); diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index 462ec7a8e7..47795ba735 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -392,14 +392,14 @@ static int vaapi_encode_issue(AVCodecContext *avctx, err = AVERROR(EIO); // vaRenderPicture() has been called here, so we should not destroy // the parameter buffers unless separate destruction is required. - if (ctx->hwctx->driver_quirks & + if (HAVE_VAAPI_1 || ctx->hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) goto fail; else goto fail_at_end; } - if (ctx->hwctx->driver_quirks & + if (HAVE_VAAPI_1 || ctx->hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) { for (i = 0; i < pic->nb_param_buffers; i++) { vas = vaDestroyBuffer(ctx->hwctx->display, |