1
mirror of https://code.videolan.org/videolan/vlc synced 2024-07-25 09:41:30 +02:00

Reject > 8 bits per pixel colorspace in gradfun/grain/transform video filters.

This commit is contained in:
Laurent Aimar 2011-10-05 21:55:25 +02:00
parent f094d815a5
commit eb71a0059f
3 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ static int Open(vlc_object_t *object)
const vlc_fourcc_t fourcc = filter->fmt_in.video.i_chroma;
const vlc_chroma_description_t *chroma = vlc_fourcc_GetChromaDescription(fourcc);
if (!chroma || chroma->plane_count < 3) {
if (!chroma || chroma->plane_count < 3 || chroma->pixel_size != 1) {
msg_Err(filter, "Unsupported chroma (%4.4s)", (char*)&fourcc);
return VLC_EGENERIC;
}

View File

@ -382,7 +382,7 @@ static int Open(vlc_object_t *object)
const vlc_chroma_description_t *chroma =
vlc_fourcc_GetChromaDescription(filter->fmt_in.video.i_chroma);
if (!chroma || chroma->plane_count < 3) {
if (!chroma || chroma->plane_count < 3 || chroma->pixel_size != 1) {
msg_Err(filter, "Unsupported chroma (%4.4s)",
(char*)&(filter->fmt_in.video.i_chroma));
return VLC_EGENERIC;

View File

@ -188,7 +188,7 @@ static int Open(vlc_object_t *object)
const vlc_chroma_description_t *chroma =
vlc_fourcc_GetChromaDescription(src->i_chroma);
if (!chroma || chroma->plane_count < 3) {
if (!chroma || chroma->plane_count < 3 || chroma->pixel_size != 1) {
msg_Err(filter, "Unsupported chroma (%4.4s)", (char*)&src->i_chroma);
/* TODO support packed and rgb */
return VLC_EGENERIC;