mirror of https://github.com/mpv-player/mpv
vaapi: destroy derived VAImage after each use
Appears to be required by some hardware. Whatever.
This commit is contained in:
parent
bc68794acc
commit
7ef8f457a8
|
@ -395,6 +395,8 @@ int va_surface_upload(struct mp_image *va_dst, struct mp_image *sw_src)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p->is_derived)
|
||||||
|
va_surface_image_destroy(p);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,6 +435,8 @@ static struct mp_image *try_download(struct mp_image *src,
|
||||||
}
|
}
|
||||||
va_image_unmap(p->ctx, image);
|
va_image_unmap(p->ctx, image);
|
||||||
}
|
}
|
||||||
|
if (p->is_derived)
|
||||||
|
va_surface_image_destroy(p);
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue