[vlc-commits] scene: reject 0 planes formats

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


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

scene: reject 0 planes formats

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

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

diff --git a/modules/video_filter/scene.c b/modules/video_filter/scene.c
index 3f71aaa..c07b8f5 100644
--- a/modules/video_filter/scene.c
+++ b/modules/video_filter/scene.c
@@ -154,6 +154,11 @@ static int Create( vlc_object_t *p_this )
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys;
 
+    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;
+
     config_ChainParse( p_filter, CFG_PREFIX, ppsz_vfilter_options,
                        p_filter->p_cfg );
 



More information about the vlc-commits mailing list