]> git.sesse.net Git - vlc/commitdiff
wall: reject 0 planes formats
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 23 Jun 2013 06:14:46 +0000 (09:14 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 7 Jul 2013 18:12:01 +0000 (21:12 +0300)
modules/video_filter/wall.c

index 8c965abb9f5de13e596767f03fa122d47828e02c..24e93849cc759ba1bcd003ddb963270e8998b722 100644 (file)
@@ -123,6 +123,11 @@ static int Open( vlc_object_t *p_this )
     video_splitter_t *p_splitter = (video_splitter_t*)p_this;
     video_splitter_sys_t *p_sys;
 
     video_splitter_t *p_splitter = (video_splitter_t*)p_this;
     video_splitter_sys_t *p_sys;
 
+    const vlc_chroma_description_t *p_chroma =
+        vlc_fourcc_GetChromaDescription( p_splitter->fmt.i_chroma );
+    if( p_chroma == NULL || p_chroma->plane_count == 0 )
+        return VLC_EGENERIC;
+
     p_splitter->p_sys = p_sys = malloc( sizeof(*p_sys) );
     if( !p_sys )
         return VLC_ENOMEM;
     p_splitter->p_sys = p_sys = malloc( sizeof(*p_sys) );
     if( !p_sys )
         return VLC_ENOMEM;