Commit ef1b187e authored by Antoine Cellerier's avatar Antoine Cellerier

Validate input chroma for grain filter (planar yuv).

parent 0c6b8c40
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <vlc_vout.h> #include <vlc_vout.h>
#include "vlc_filter.h" #include "vlc_filter.h"
#include "filter_picture.h"
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
...@@ -67,7 +68,16 @@ static int Create( vlc_object_t *p_this ) ...@@ -67,7 +68,16 @@ static int Create( vlc_object_t *p_this )
{ {
filter_t *p_filter = (filter_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 */ /* Allocate structure */
p_filter->p_sys = malloc( sizeof( filter_sys_t ) ); p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment