[vlc-devel] [PATCH 1/2] direct3d9: do not try to use the vout if the texture requested is too large

Steve Lhomme robux4 at videolabs.io
Fri May 27 09:21:00 CEST 2016


This might help with this (3 years old) issue
https://trac.videolan.org/vlc/ticket/8774

On Fri, May 27, 2016 at 9:18 AM, Steve Lhomme <robux4 at videolabs.io> wrote:
> ---
>  modules/video_output/win32/direct3d9.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
> index f9e68a8..784612d 100644
> --- a/modules/video_output/win32/direct3d9.c
> +++ b/modules/video_output/win32/direct3d9.c
> @@ -648,6 +648,16 @@ static int Direct3D9Create(vout_display_t *vd)
>          return VLC_EGENERIC;
>      }
>
> +    if ( vd->fmt.i_width > sys->d3dcaps.MaxTextureWidth ||
> +         vd->fmt.i_height > sys->d3dcaps.MaxTextureHeight )
> +    {
> +        msg_Err(vd, "Textures too large %ux%u max possible: %ux%u",
> +                vd->fmt.i_width, vd->fmt.i_height,
> +                (unsigned) sys->d3dcaps.MaxTextureWidth,
> +                (unsigned) sys->d3dcaps.MaxTextureHeight);
> +        return VLC_EGENERIC;
> +    }
> +
>      return VLC_SUCCESS;
>  }
>
> --
> 2.8.1
>


More information about the vlc-devel mailing list