[vlc-commits] motionblur: 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:34 2013 +0300| [beb19373dedfa85705115789856c8da03972c750] | committer: Rémi Denis-Courmont

motionblur: reject 0 planes formats

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

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

diff --git a/modules/video_filter/motionblur.c b/modules/video_filter/motionblur.c
index 0e46479..4dedc12 100644
--- a/modules/video_filter/motionblur.c
+++ b/modules/video_filter/motionblur.c
@@ -91,6 +91,11 @@ static int Create( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
 
+    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 = malloc( sizeof( filter_sys_t ) );
     if( p_filter->p_sys == NULL )



More information about the vlc-commits mailing list