[vlc-commits] puzzle: reject 0 planes formats

Rémi Denis-Courmont git at videolan.org
Sun Jul 7 20:13:40 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 23 09:12:48 2013 +0300| [10e1f8241f250efdfde4e19e6efb1fc6f489df6a] | committer: Rémi Denis-Courmont

puzzle: reject 0 planes formats

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10e1f8241f250efdfde4e19e6efb1fc6f489df6a
---

 modules/video_filter/puzzle.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c
index 5a34d92..be4065b 100644
--- a/modules/video_filter/puzzle.c
+++ b/modules/video_filter/puzzle.c
@@ -134,6 +134,11 @@ int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    const vlc_chroma_description_t *p_chroma =
+        vlc_fourcc_GetChromaDescription( p_filter->fmt_in.video.i_chroma );
+    if( p_chroma == NULL || p_chroma->plane_count == 0 )
+        return VLC_EGENERIC;
+
     /* Allocate structure */
     p_filter->p_sys = p_sys = calloc(1, sizeof( *p_sys ) );
     if( !p_sys )



More information about the vlc-commits mailing list