Commit 212661f3 authored by Laurent Aimar's avatar Laurent Aimar
Browse files

Revert "Fix render picture out-of-memory handling"

This reverts commit 8acffd0c.

It has nothing to do with the patch in itself (which is perfectly fine)
but it conflicts too much with the following patches (which will also fix
the issue). I hope it's ok.
parent 3f50c72a
......@@ -913,7 +913,6 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
if (filtered &&
(vout->p->decoder_pool != vout->p->display_pool || subpic)) {
picture_t *render;
if (vout->p->is_decoder_pool_slow)
render = picture_NewFromFormat(&vd->source);
else if (vout->p->decoder_pool != vout->p->display_pool)
......@@ -921,24 +920,17 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
else
render = picture_pool_Get(vout->p->private_pool);
if (unlikely(render == NULL)) {
picture_Release(filtered);
return VLC_EGENERIC;
}
picture_Copy(render, filtered);
spu_RenderSubpictures(vout->p->spu,
render, &vd->source,
subpic, &vd->source, spu_render_time);
if (render) {
picture_Copy(render, filtered);
spu_RenderSubpictures(vout->p->spu,
render, &vd->source,
subpic, &vd->source, spu_render_time);
}
if (vout->p->is_decoder_pool_slow) {
direct = picture_pool_Get(vout->p->display_pool);
if (unlikely(direct == NULL)) {
picture_Release(render);
picture_Release(filtered);
return VLC_EGENERIC;
}
picture_Copy(direct, render);
if (direct)
picture_Copy(direct, render);
picture_Release(render);
} else {
......@@ -946,12 +938,13 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
}
VideoFormatCopyCropAr(&direct->format, &filtered->format);
picture_Release(filtered);
filtered = NULL;
} else {
direct = filtered;
}
assert (direct != NULL);
if (!direct)
return VLC_EGENERIC;
/*
* Take a snapshot if requested
......
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