]> git.sesse.net Git - vlc/commitdiff
Check the input chroma. (We only want to work on I420 for the moment)
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 31 Mar 2007 19:08:12 +0000 (19:08 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 31 Mar 2007 19:08:12 +0000 (19:08 +0000)
modules/video_filter/erase.c

index 14125450941e74014f296b40f8c6b749f5eeebe6..be9d6a78028ce9a69f3b4313738f7aa1f60ac0da 100644 (file)
@@ -174,6 +174,20 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     picture_t *p_outpic;
 
     if( !p_pic ) return NULL;
+    switch( p_pic->format.i_chroma )
+    {
+        case VLC_FOURCC('I','4','2','0'):
+        case VLC_FOURCC('I','Y','U','V'):
+        case VLC_FOURCC('J','4','2','0'):
+        case VLC_FOURCC('Y','V','1','2'):
+            break;
+        default:
+            msg_Warn( p_filter, "Unsupported input chroma (%4s)",
+                      (char*)&(p_pic->format.i_chroma) );
+            if( p_pic->pf_release )
+                p_pic->pf_release( p_pic );
+            return NULL;
+    }
 
     p_outpic = p_filter->pf_vout_buffer_new( p_filter );
     if( !p_outpic )