mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
vf_scale_vaapi: Respect driver quirks around buffer destruction
(cherry picked from commit 582d4211e00015b68626f77ce4af53161e2b1713)
This commit is contained in:
parent
2dee500f4c
commit
1a359e5341
@ -342,13 +342,14 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
|
|||||||
goto fail_after_render;
|
goto fail_after_render;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This doesn't get freed automatically for some reason.
|
if (ctx->hwctx->driver_quirks &
|
||||||
vas = vaDestroyBuffer(ctx->hwctx->display, params_id);
|
AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) {
|
||||||
if (vas != VA_STATUS_SUCCESS) {
|
vas = vaDestroyBuffer(ctx->hwctx->display, params_id);
|
||||||
av_log(ctx, AV_LOG_ERROR, "Failed to free parameter buffer: "
|
if (vas != VA_STATUS_SUCCESS) {
|
||||||
"%d (%s).\n", vas, vaErrorStr(vas));
|
av_log(ctx, AV_LOG_ERROR, "Failed to free parameter buffer: "
|
||||||
err = AVERROR(EIO);
|
"%d (%s).\n", vas, vaErrorStr(vas));
|
||||||
goto fail;
|
// And ignore.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
av_frame_copy_props(output_frame, input_frame);
|
av_frame_copy_props(output_frame, input_frame);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user