]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/alphamask.c
Removed OSD_ALIGN_* flags.
[vlc] / modules / video_filter / alphamask.c
index af46bd7a641092976a64084cd039544c6958dd5e..c2b11c43aa1e3f4ca5d7642bc52e7df0a15662d6 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
-#include <vlc_vout.h>
 
 #include <vlc_image.h>
 #include <vlc_filter.h>
@@ -90,10 +89,10 @@ static int Create( vlc_object_t *p_this )
     filter_sys_t *p_sys;
     char *psz_string;
 
-    if( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','U','V','A') )
+    if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA )
     {
         msg_Err( p_filter,
-                 "Unsupported input chroma \"%4s\". "
+                 "Unsupported input chroma \"%4.4s\". "
                  "Alphamask can only use \"YUVA\".",
                  (char*)&p_filter->fmt_in.video.i_chroma );
         return VLC_EGENERIC;
@@ -108,7 +107,8 @@ static int Create( vlc_object_t *p_this )
     config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options,
                        p_filter->p_cfg );
 
-    p_sys->p_mask = NULL;
+    psz_string =
+        var_CreateGetStringCommand( p_filter, CFG_PREFIX "mask" );
     if( psz_string && *psz_string )
     {
         LoadMask( p_filter, psz_string );
@@ -116,11 +116,11 @@ static int Create( vlc_object_t *p_this )
             msg_Err( p_filter, "Error while loading mask (%s).",
                      psz_string );
     }
+    else
+       p_sys->p_mask = NULL;
     free( psz_string );
 
     vlc_mutex_init( &p_sys->mask_lock );
-    psz_string =
-        var_CreateGetStringCommand( p_filter, CFG_PREFIX "mask" );
     var_AddCallback( p_filter, CFG_PREFIX "mask", MaskCallback,
                      p_filter );
     p_filter->pf_video_filter = Filter;
@@ -178,7 +178,7 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
     video_format_t fmt_in, fmt_out;
     memset( &fmt_in, 0, sizeof( video_format_t ) );
     memset( &fmt_out, 0, sizeof( video_format_t ) );
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
     if( p_filter->p_sys->p_mask )
         picture_Release( p_filter->p_sys->p_mask );
     p_image = image_HandlerCreate( p_filter );