[vlc-devel] [PATCH] picture_pool: copy the visible lines/pitch when cloning a picture from the pool

Rémi Denis-Courmont remi at remlab.net
Thu Aug 18 14:46:33 CEST 2016


Le torstaina 18. elokuuta 2016, 14.27.34 EEST Steve Lhomme a écrit :
> ---
>  src/misc/picture_pool.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
> index 8a507ac..987df94 100644
> --- a/src/misc/picture_pool.c
> +++ b/src/misc/picture_pool.c
> @@ -109,6 +109,10 @@ static picture_t
> *picture_pool_ClonePicture(picture_pool_t *pool, if (likely(clone != NULL))
> {
>          ((picture_priv_t *)clone)->gc.opaque = (void *)sys;
>          picture_Hold(picture);
> +        for (int i = 0; i < picture->i_planes; i++) {
> +            clone->p[i].i_visible_pitch = picture->p[i].i_visible_pitch;
> +            clone->p[i].i_visible_lines = picture->p[i].i_visible_lines;
> +        }
>      }
>      return clone;
>  }

That looks like a hack. You don´t explain why it´s needed, and if it really is 
needed, it would seem out of place.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list