[vlc-commits] commit: Revert "Fix render picture out-of-memory handling" (Laurent Aimar )
git at videolan.org
git at videolan.org
Sun Jan 9 22:44:18 CET 2011
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jan 9 22:29:29 2011 +0100| [212661f3ddca4c59724edff7fa21985783feeb8b] | committer: Laurent Aimar
Revert "Fix render picture out-of-memory handling"
This reverts commit 8acffd0c9b4f5cd08e1ff306f204c1f2a864a583.
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=212661f3ddca4c59724edff7fa21985783feeb8b
---
src/video_output/video_output.c | 29 +++++++++++------------------
1 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index dc4ebbc..d71701a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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
More information about the vlc-commits
mailing list