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

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) ...@@ -913,7 +913,6 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
if (filtered && if (filtered &&
(vout->p->decoder_pool != vout->p->display_pool || subpic)) { (vout->p->decoder_pool != vout->p->display_pool || subpic)) {
picture_t *render; picture_t *render;
if (vout->p->is_decoder_pool_slow) if (vout->p->is_decoder_pool_slow)
render = picture_NewFromFormat(&vd->source); render = picture_NewFromFormat(&vd->source);
else if (vout->p->decoder_pool != vout->p->display_pool) else if (vout->p->decoder_pool != vout->p->display_pool)
...@@ -921,23 +920,16 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced) ...@@ -921,23 +920,16 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
else else
render = picture_pool_Get(vout->p->private_pool); render = picture_pool_Get(vout->p->private_pool);
if (unlikely(render == NULL)) { if (render) {
picture_Release(filtered);
return VLC_EGENERIC;
}
picture_Copy(render, filtered); picture_Copy(render, filtered);
spu_RenderSubpictures(vout->p->spu, spu_RenderSubpictures(vout->p->spu,
render, &vd->source, render, &vd->source,
subpic, &vd->source, spu_render_time); subpic, &vd->source, spu_render_time);
}
if (vout->p->is_decoder_pool_slow) { if (vout->p->is_decoder_pool_slow) {
direct = picture_pool_Get(vout->p->display_pool); direct = picture_pool_Get(vout->p->display_pool);
if (unlikely(direct == NULL)) { if (direct)
picture_Release(render);
picture_Release(filtered);
return VLC_EGENERIC;
}
picture_Copy(direct, render); picture_Copy(direct, render);
picture_Release(render); picture_Release(render);
...@@ -946,12 +938,13 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced) ...@@ -946,12 +938,13 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
} }
VideoFormatCopyCropAr(&direct->format, &filtered->format); VideoFormatCopyCropAr(&direct->format, &filtered->format);
picture_Release(filtered); picture_Release(filtered);
filtered = NULL;
} else { } else {
direct = filtered; direct = filtered;
} }
assert (direct != NULL); if (!direct)
return VLC_EGENERIC;
/* /*
* Take a snapshot if requested * 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