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:
wm4 2016-06-19 19:52:49 +02:00
parent 0cf187caca
commit 754ad1d730
1 changed files with 1 additions and 0 deletions

View File

@ -47,6 +47,7 @@ struct mp_refqueue *mp_refqueue_alloc(void)
void mp_refqueue_free(struct mp_refqueue *q)
{
mp_refqueue_flush(q);
talloc_free(q);
}