[vlc-devel] [PATCH] Win32: use visible dimensions for all vouts

Rémi Denis-Courmont remi at remlab.net
Thu Feb 27 17:36:57 CET 2014


Le mercredi 26 février 2014, 19:33:38 Felix Abecassis a écrit :
> Close #9645
> ---
>  modules/video_output/msw/common.c   |    8 ++++----
>  modules/video_output/msw/direct2d.c |    4 ++--
>  modules/video_output/msw/direct3d.c |   10 +++++-----
>  modules/video_output/msw/directx.c  |    4 ++--
>  4 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/modules/video_output/msw/common.c
> b/modules/video_output/msw/common.c index f4954b1..529db39 100644
> --- a/modules/video_output/msw/common.c
> +++ b/modules/video_output/msw/common.c
> @@ -213,7 +213,7 @@ int CommonUpdatePicture(picture_t *picture, picture_t
> **fallback, /* fill in buffer info in first plane */
>      picture->p->p_pixels = data;
>      picture->p->i_pitch  = pitch;
> -    picture->p->i_lines  = picture->format.i_height;
> +    picture->p->i_lines  = picture->format.i_visible_height;

I don't think it is legal for i_lines to be smaller than i_height. This may 
very well cause buffer overruns in filters or decoders.

(Same thing for i_pitch and i_height * i_pixel_pitch.)

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




More information about the vlc-devel mailing list