Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-06-27 00:35:49 +0300
committerMark Thompson <sw@jkqxz.net>2016-07-02 16:09:58 +0300
commit582d4211e00015b68626f77ce4af53161e2b1713 (patch)
treeb9e964657db15c8360c2e0965ccc1e70b1c17b43 /libavfilter/vf_scale_vaapi.c
parent221ffca6314ed3ba9d38464ea50cd85251c04e74 (diff)
vf_scale_vaapi: Respect driver quirks around buffer destruction
Diffstat (limited to 'libavfilter/vf_scale_vaapi.c')
-rw-r--r--libavfilter/vf_scale_vaapi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c
index d5c1847aad..561e09c4dc 100644
--- a/libavfilter/vf_scale_vaapi.c
+++ b/libavfilter/vf_scale_vaapi.c
@@ -342,13 +342,14 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
goto fail_after_render;
}
- // This doesn't get freed automatically for some reason.
- vas = vaDestroyBuffer(ctx->hwctx->display, params_id);
- if (vas != VA_STATUS_SUCCESS) {
- av_log(ctx, AV_LOG_ERROR, "Failed to free parameter buffer: "
- "%d (%s).\n", vas, vaErrorStr(vas));
- err = AVERROR(EIO);
- goto fail;
+ if (ctx->hwctx->driver_quirks &
+ AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) {
+ vas = vaDestroyBuffer(ctx->hwctx->display, params_id);
+ if (vas != VA_STATUS_SUCCESS) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to free parameter buffer: "
+ "%d (%s).\n", vas, vaErrorStr(vas));
+ // And ignore.
+ }
}
av_frame_copy_props(output_frame, input_frame);