]> git.sesse.net Git - vlc/commitdiff
Reject > 8 bits per pixel colorspace in gradfun/grain/transform video filters.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 5 Oct 2011 19:55:25 +0000 (21:55 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 5 Oct 2011 21:17:36 +0000 (23:17 +0200)
modules/video_filter/gradfun.c
modules/video_filter/grain.c
modules/video_filter/transform.c

index 765cf643604c2aae5d0147339c7ade37e5329ae6..4db3d1deaf4f81661db0df6d6dfdd41a8cab9cf9 100644 (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;
     }
index 1d5f9ccc4cd266c7eee3e1b8ee8b72aa67c2b891..cbdb13329f67076b862575f478788fbfac5a33ac 100644 (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;
index 5e86fc0cfbc7af34ece86c3e3903340023422ba9..9f6a751636fb6eee81b2a9e9eda89cdd92f240fd 100644 (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;