[vlc-devel] commit: Validate input chroma in gradient filter ( the current code only supports (Antoine Cellerier )
git version control
git at videolan.org
Sat May 31 17:18:03 CEST 2008
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat May 31 17:00:26 2008 +0200| [7e748b09efa87817a363338c8f75858e0a2a425c]
Validate input chroma in gradient filter (the current code only supports
planar YUV).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7e748b09efa87817a363338c8f75858e0a2a425c
---
modules/video_filter/gradient.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/modules/video_filter/gradient.c b/modules/video_filter/gradient.c
index f600835..3d70a4a 100644
--- a/modules/video_filter/gradient.c
+++ b/modules/video_filter/gradient.c
@@ -1,7 +1,7 @@
/*****************************************************************************
* gradient.c : Gradient and edge detection video effects plugin for vlc
*****************************************************************************
- * Copyright (C) 2000-2006 the VideoLAN team
+ * Copyright (C) 2000-2008 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam at zoy.org>
@@ -38,6 +38,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
+#include "filter_picture.h"
enum { GRADIENT, EDGE, HOUGH };
@@ -131,6 +132,17 @@ static int Create( vlc_object_t *p_this )
filter_t *p_filter = (filter_t *)p_this;
char *psz_method;
+ switch( p_filter->fmt_in.video.i_chroma )
+ {
+ CASE_PLANAR_YUV
+ break;
+
+ default:
+ msg_Err( p_filter, "Unsupported input chroma (%4s)",
+ (char*)&(p_filter->fmt_in.video.i_chroma) );
+ 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-devel
mailing list