Commit 1f08e253 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: destroy the private pool while resetting the decoder pool

Otherwise picture references from the private pool get clobbered.
parent f1b80fa3
......@@ -1199,8 +1199,21 @@ static void ThreadFlush(vout_thread_t *vout, bool below, mtime_t date)
static void ThreadReset(vout_thread_t *vout)
{
ThreadFlush(vout, true, INT64_MAX);
if (vout->p->decoder_pool)
if (vout->p->decoder_pool) {
unsigned count;
if (vout->p->private_pool != NULL) {
count = picture_pool_GetSize(vout->p->private_pool);
picture_pool_Delete(vout->p->private_pool);
}
picture_pool_Reset(vout->p->decoder_pool);
if (vout->p->private_pool != NULL) {
vout->p->private_pool = picture_pool_Reserve(vout->p->decoder_pool,
count);
if (vout->p->private_pool == NULL)
abort();
}
}
vout->p->pause.is_on = false;
vout->p->pause.date = mdate();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment