Commit 93d6d949 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: handle pool callback failure (fixes #14908)

parent abb3f838
......@@ -940,7 +940,9 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
assert(vout_IsDisplayFiltered(vd) == !sys->display.use_dr);
if (sys->display.use_dr && !is_direct) {
picture_t *direct = picture_pool_Get(vout->p->display_pool);
picture_t *direct = NULL;
if (likely(vout->p->display_pool != NULL))
direct = picture_pool_Get(vout->p->display_pool);
if (!direct) {
picture_Release(todisplay);
if (subpic)
......
......@@ -133,6 +133,9 @@ int vout_InitWrapper(vout_thread_t *vout)
const unsigned display_pool_size = allow_dr ? __MAX(VOUT_MAX_PICTURES,
reserved_picture + decoder_picture) : 3;
picture_pool_t *display_pool = vout_display_Pool(vd, display_pool_size);
if (display_pool == NULL)
return VLC_EGENERIC;
#ifndef NDEBUG
if ( picture_pool_GetSize(display_pool) < display_pool_size )
msg_Warn(vout, "Not enough display buffers in the pool, requested %d got %d",
......
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