[vlc-devel] [PATCH 1/2] vout: don't assume private_pool is not NULL
Thomas Guillem
thomas at gllm.fr
Tue Nov 4 09:52:48 CET 2014
---
src/video_output/video_output.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 2a6fe2a..9f9c1c8 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -632,7 +632,9 @@ static picture_t *VoutVideoFilterInteractiveNewPicture(filter_t *filter)
{
vout_thread_t *vout = filter->owner.sys;
- picture_t *picture = picture_pool_Get(vout->p->private_pool);
+ picture_t *picture = vout->p->private_pool ?
+ picture_pool_Get(vout->p->private_pool) :
+ NULL;
if (picture) {
picture_Reset(picture);
VideoFormatCopyCropAr(&picture->format, &filter->fmt_out.video);
@@ -933,7 +935,9 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
bool is_direct = vout->p->decoder_pool == vout->p->display_pool;
picture_t *todisplay = filtered;
if (do_early_spu && subpic) {
- picture_t *blent = picture_pool_Get(vout->p->private_pool);
+ picture_t *blent = vout->p->private_pool ?
+ picture_pool_Get(vout->p->private_pool) :
+ NULL;
if (blent) {
VideoFormatCopyCropAr(&blent->format, &filtered->format);
picture_Copy(blent, filtered);
--
2.1.1
More information about the vlc-devel
mailing list