[vlc-devel] [PATCH] filter: don't create blending filters for fake fmt
Rémi Denis-Courmont
remi at remlab.net
Thu Apr 23 09:22:48 CEST 2015
Le 2015-04-23 10:06, Thomas Guillem a écrit :
> Since we know the filter configure will fail.
Why do you want this for? I think at least VDPAU blend could be
implemented - I just did not see a use for it so far.
> ---
> src/misc/filter.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/src/misc/filter.c b/src/misc/filter.c
> index 36f1ba4..fd2f362 100644
> --- a/src/misc/filter.c
> +++ b/src/misc/filter.c
> @@ -33,7 +33,17 @@
> filter_t *filter_NewBlend( vlc_object_t *p_this,
> const video_format_t *p_dst_chroma )
> {
> - filter_t *p_blend = vlc_custom_create( p_this, sizeof(*p_blend),
> "blend" );
> + filter_t *p_blend;
> + const vlc_chroma_description_t *p_desc;
> +
> + p_desc = vlc_fourcc_GetChromaDescription( p_dst_chroma->i_chroma
> );
> + if( !p_desc || p_desc->plane_count == 0 )
> + {
> + msg_Err( p_this, "Could not create blending filter for fake
> fmt" );
> + return NULL;
> + }
> +
> + p_blend = vlc_custom_create( p_this, sizeof(*p_blend), "blend"
> );
> if( !p_blend )
> return NULL;
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list