mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 23:02:37 +00:00
vdpau, vaapi: unref libavutil device ref
It's a simple memory leak. (The API objects were destroyed anyway.)
This commit is contained in:
parent
142b2f23d4
commit
b5b3aadf40
@ -224,6 +224,8 @@ error:
|
||||
void va_destroy(struct mp_vaapi_ctx *ctx)
|
||||
{
|
||||
if (ctx) {
|
||||
av_buffer_unref(&ctx->av_device_ref);
|
||||
|
||||
if (ctx->display)
|
||||
vaTerminate(ctx->display);
|
||||
|
||||
|
@ -481,6 +481,8 @@ void mp_vdpau_destroy(struct mp_vdpau_ctx *ctx)
|
||||
CHECK_VDP_WARNING(ctx, "Error when calling vdp_output_surface_destroy");
|
||||
}
|
||||
|
||||
av_buffer_unref(&ctx->av_device_ref);
|
||||
|
||||
if (ctx->preemption_obj != VDP_INVALID_HANDLE) {
|
||||
vdp_st = vdp->output_surface_destroy(ctx->preemption_obj);
|
||||
CHECK_VDP_WARNING(ctx, "Error when calling vdp_output_surface_destroy");
|
||||
|
Loading…
Reference in New Issue
Block a user