[vlc-devel] [PATCH 1/2] vout: don't assume private_pool is not NULL

Rémi Denis-Courmont remi at remlab.net
Tue Nov 4 10:13:11 CET 2014


Le 2014-11-04 11:52, Thomas Guillem a écrit :
> ---
>  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;

Brrr. I'm all for removing the private pool or reducing its use, but I 
don't like to pretend that it's not needed when it really is.

>      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);

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list