[vlc-devel] commit: Validate input chroma for grain filter (planar yuv). ( 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:07:58 2008 +0200| [ef1b187e33d3bfac639e5b32e141ae8a516c9774]
Validate input chroma for grain filter (planar yuv).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef1b187e33d3bfac639e5b32e141ae8a516c9774
---
modules/video_filter/grain.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/modules/video_filter/grain.c b/modules/video_filter/grain.c
index 041e873..ad01a25 100644
--- a/modules/video_filter/grain.c
+++ b/modules/video_filter/grain.c
@@ -34,6 +34,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
+#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
@@ -67,7 +68,16 @@ static int Create( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
- /* FIXME: check that chroma is YUV based */
+ 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 ) );
More information about the vlc-devel
mailing list