Commit 908a5134 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

invert: check supported chroma (fixes #8840, fixes #8841)

parent fe44d66b
......@@ -64,9 +64,19 @@ vlc_module_end ()
static int Create( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
vlc_fourcc_t fourcc = p_filter->fmt_in.video.i_chroma;
p_filter->pf_video_filter = Filter;
if( fourcc == VLC_CODEC_YUVP || fourcc == VLC_CODEC_RGBP
|| fourcc == VLC_CODEC_RGBA )
return VLC_EGENERIC;
const vlc_chroma_description_t *p_chroma =
vlc_fourcc_GetChromaDescription( fourcc );
if( p_chroma == NULL
|| p_chroma->pixel_size * 8 != p_chroma->pixel_bits )
return VLC_EGENERIC;
p_filter->pf_video_filter = Filter;
return VLC_SUCCESS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment