mirror of https://github.com/mpv-player/mpv
refqueue: free referenced images on free
Otherwise stale references will survive forever. Could leak hardware video surfaces. In particular, the mpv vdpau code crashed with an assertion when exiting after toggling deinterlacing, because not all references were released.
This commit is contained in:
parent
0cf187caca
commit
754ad1d730
|
@ -47,6 +47,7 @@ struct mp_refqueue *mp_refqueue_alloc(void)
|
||||||
|
|
||||||
void mp_refqueue_free(struct mp_refqueue *q)
|
void mp_refqueue_free(struct mp_refqueue *q)
|
||||||
{
|
{
|
||||||
|
mp_refqueue_flush(q);
|
||||||
talloc_free(q);
|
talloc_free(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue