0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

vdpau, vaapi: unref libavutil device ref

It's a simple memory leak. (The API objects were destroyed anyway.)
This commit is contained in:
wm4 2017-04-29 15:09:26 +02:00
parent 142b2f23d4
commit b5b3aadf40
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -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");